Bind & root

O Ilusionista

Captain 100K
Hi,
I have two questions:

1- I want to make my playable chars to be able to pick up boxes and throw, but I don't want to add the boxes sprites to the chars (and I know this is wrong). So, I need to know if there is a way to bind the boxes to my char, so I can use his own animation without the box
el131zl.png


Would this be useful? http://www.chronocrash.com/forum/index.php?topic=677.msg5247;topicseen#new

2- This is something common in mugen but I don't know how to do it yet. Imagine that my char is using a full screen beam, and I don't want to include the beam on the char's graphics.

I need to make that if something hit the player who summoned the beam entity (iow, the root of the entity), the beam should be destroyed.
 
im trying to reproduce the same systems of this game into my avengers game too

i already have did some and will post here to you:

in character
Code:
anim	freespecial6
	loop	0
	delay	7
	energycost	10
	mponly	2
	subentity	ironbeam
	spawnframe	3 68 0 78 0
	offset	56 111
	bbox	0 0 0 0
	sound	data/chars/vision/vbeam.wav
	frame	data/chars/ironpatriot/spec1.pcx
	offset	58 99
	sound	data/chars/ironpatriot/fgbghop.wav
	hitfx	data/sounds/beat2.wav
	delay	4
	attack3	14 10 111 44 30 1 0 0 22 0
	frame	data/chars/ironpatriot/spec2.pcx
	offset	60 113
	frame	data/chars/ironpatriot/spec3.pcx
	attack3	0 0 0 0 0 0
	frame	data/chars/ironpatriot/spec3.pcx
	frame	data/chars/ironpatriot/spec3.pcx
	frame	data/chars/ironpatriot/spec3.pcx
	frame	data/chars/ironpatriot/spec3.pcx
	delay	22
	frame	data/chars/ironpatriot/spec3.pcx
	delay	8
	frame	data/chars/ironpatriot/spec3.pcx


ironbeam.txt
Code:
name	ironbeam
health	0
type	none
shadow	1
alpha    1
nolife  1
speed   28
candamage enemy obstacle NPC
gfxshadow 1
remove   0
subject_to_gravity 0










anim	idle
	loop	0
	delay	4
@script
if(frame == 8){
void self = getlocalvar("self");
killentity(self);
}
	@end_script	
	offset	0 26
	blast	-3 0 513 51 30 0 0 22 0 0
	frame	data/chars/ironpatriot/ob5.pcx
	offset	0 23
	blast	-5 1 692 46 30 0 22 1 0 0
	frame	data/chars/ironpatriot/ob6.pcx
	offset	0 31
	blast	0 -1 832 67 30 1 22 1 0 0
	frame	data/chars/ironpatriot/ob7.pcx
	offset	0 26
	frame	data/chars/ironpatriot/ob8.pcx
	offset	0 16
	blast	-1 2 688 26 30 1 1 0 0 0
	frame	data/chars/ironpatriot/ob9.pcx
	offset	0 4
	blast	0 0 0 0 0 1 0 1 0 0
	frame	data/chars/ironpatriot/ob10.pcx
	offset	0 3
	frame	data/chars/ironpatriot/ob11.pcx
	frame	data/chars/misc/0empty.gif

air diagonal beam
Code:
anim	jumpattack2
@script
    void vSelf = getlocalvar("self");

    if(frame==1){
      int  iTime = openborvariant("elapsed_time");

      changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward
      changeentityproperty(vSelf, "tosstime", iTime + 140);
    }
	@end_script
	loop	0
	subentity	visionbeam
	spawnframe	3 60 0 -50 0
	delay	10
	offset	28 121
	bbox	7 7 50 109
	sound	data/chars/vision/vbeam.wav
	frame	data/chars/ironpatriot/rja1.pcx
	bbox	7 5 102 102
	frame	data/chars/ironpatriot/rja2.pcx
	offset	21 111
	frame	data/chars/ironpatriot/rja3.pcx
	frame	data/chars/ironpatriot/rja3.pcx
	frame	data/chars/ironpatriot/rja3.pcx
	bbox	5 5 52 106
	frame	data/chars/ironpatriot/rja1.pcx


visionbeam.txt
Code:
name	visionbeam
health	0
type	none
shadow	1
alpha    1
nolife  1
speed   28
candamage enemy obstacle
gfxshadow 1
remove   0



anim	idle
	loop	0
	delay	4
@script
if(frame == 4){
void self = getlocalvar("self");
killentity(self);
}
	@end_script	
	offset	-14 118
	blast	2 2 309 113 30 0 0 0 0 0
	frame	data/chars/vision/vb1.pcx
	blast	3 5 441 150 30 0 1 0 0 0
	frame	data/chars/vision/vb2.pcx
	blast	5 7 441 156 30 1 1 0 0 0
	frame	data/chars/vision/vb3.pcx
	attack	3 4 307 125 0 0 1 0 0 0
	frame	data/chars/vision/vb4.pcx
	frame	data/chars/misc/0empty.gif

for the dynamic throw system is buged but im uploading the wargems beta6 to you take a look

esse jogo eh um dos meus favoritos e eu quero fazer ele com vc ja q muita coisa dele se for seguir o sistema original vai ser util no meu avengers com graficos marvel vs capcom tb eheheh
 
yeah, I got it, but or I am dumb or the code doesn't does that I need:

Code:
@script
if(frame == 8){
void self = getlocalvar("self");
killentity(self);
}
	@end_script

It will kill itself just if it reaches the frame 8 (btw, I have a better way to do this, using lifespan). What happens if you hit the root and the beam is still on the frame 3, for example? The root player will be knocked out and the beam will be floating on the air.

The beam is like Cyclop's eye blast.
 
What happens if you hit the root and the beam is still on the frame 3, for example? The root player will be knocked out and the beam will be floating on the air.

If your beam is short (in animation time that is), it would be okay. But if it's long, you should break it into shorter beams. Then you shoot each beams with script one by one. This way if you got interrupted, it won't look bad.

Alternatively, you can use binding script. There's flag in bind function which 'tells' bound entity to remove itself if animation doesn't match such as getting hit or interrupted.

1- I want to make my playable chars to be able to pick up boxes and throw, but I don't want to add the boxes sprites to the chars (and I know this is wrong).

I'm glad rafhot's solution is fine for you. I was afraid you want the box to be destructible as well
 
Alternatively, you can use binding script. There's flag in bind function which 'tells' bound entity to remove itself if animation doesn't match such as getting hit or interrupted.

Which script?

I'm glad rafhot's solution is fine for you. I was afraid you want the box to be destructible as well

While it is at the floor? yes, I want it to be destructible if you hit it.
There is a way to do that?
 
Which script?

Hmmm.... rafhot has posted example somewhere here:

http://www.chronocrash.com/forum/index.php?topic=677.0

yes, I want it to be destructible if you hit it.
There is a way to do that?

There is a way but it's pretty complex. When box or any pickable objects are spawned, they also spawn invisible item. The objects themselves are type obstacle. If player picks the item, the obstacle are removed and player changes model to weapon model holding this obstacle. If player destroys the obstacle instead, the item is removed.

That's the theory, I don't have real example ATM.
 
I'm interested in such a feature.
IMO, This is something that should be included in basic openbor system...
Picking up certain types of obstacles and use them as :
- obstacles to put somewhere you want to (useful for plateform-puzzle games)
- use them as projectiles (useful in any freaking game)

Actually I used such a feature for an old project... In mugen...
mugensystem001.jpg


Hem : don't talk me about this apple, it's a beta bug about droping item system. :P
 
Back
Top Bottom