laser beam problem

jonsilva

New member
hello

iam trying to make an enemy shoot a projectile in attack6 with @cmd spawn01


exampl.gif



the problem is when the enemy is hit or falls the projectile stays there
i whanted it to disapear when the enemy its not in attack6 animation

so far ive tried spawngun in attack6 and killgun in pain / fall and idle animations.... but there seems to be a problem sometimes the laser beam spawns others it doesnt or it disapears in the middle of animation...

anyone know how to make a laser beam shoot that disapears when enemy gests hit ???
 
The simplest solution is to set followup in laser beam's IDLE to change to say FOLLOW1 animation. The beam kills itself in that follow animation.

Now, if you want special condition to remove the beam, you need special script for this.

Before continuing, why does laser beam must remove itself only when hit enemy is not in ATTACK6?
 
it works more or less like that street alpha super of ryo...
were he trows a super aduken

the middle frames of the laser beam loop... so it stays on screen some time... it gives you enough time to run behind the enemy and attack him

anim spawn
loop 0
delay 6
offset 20 110
frame data/chars/beyond/1alien11/pw/a01.gif
burn 53 40 110 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a02.gif
burn 52 40 145 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a03.gif
burn 52 40 180 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a04.gif
burn 50 40 210 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a05.gif
burn 51 40 243 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a06.gif
burn 0 0 0 0
frame data/chars/beyond/1alien11/pw/a07.gif
burn 50 40 310 40 12 1 0 0 11 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a08.gif
burn 0 0 0 0
frame data/chars/beyond/1alien11/pw/a09.gif
burn 50 40 310 40 12 1 0 0 11 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a10.gif
burn 0 0 0 0
frame data/chars/beyond/1alien11/pw/a11.gif
@cmd looper 8 4
frame data/chars/beyond/1alien11/pw/a07.gif
burn 51 40 243 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a06.gif
burn 50 40 210 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a05.gif
burn 52 40 180 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a04.gif
burn 52 40 145 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a03.gif
burn 53 40 110 35 12 1 0 0 10 10
dropv 5 3
frame data/chars/beyond/1alien11/pw/a02.gif
burn 0 0 0 0
frame data/chars/beyond/1alien11/pw/a01.gif
frame data/chars/beyond/1alien11/pw/a00.gif
@cmd suicide
frame data/chars/beyond/1alien11/pw/a00.gif

the enemy shoots the beam with attack6 i was thinking the best solution would be to remove the beam if he is not in attack6 animation...

i already have an old enemy that shoots a laser beam... and ive used killgun to remove it when he gets hit or fall... but there seems to be some problems like ive posted above... you usually notice when you spawn 3 of these enemies at same time

 
After rereading this thread, I understand the problem.
You need to add this function to your animation script/library:

Code:
void spawnBind(void Name, float dx, float dy, float dz, int Dir, int Flag)
{ // Spawn entity and bind it
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, dz);
   bindentity(Spawn, self, dx, dz, dy, Dir, Flag);
}

This function calls for spawn01 function which you already have.

Declare it like this:

@cmd spawnBind "Beam" 0 0 0 1 4
The first 4 parameters are same as spawn01's . Parameter 2nd from last is to define Beam's facing direction relative to spawner, just set 1 if you want it to face same direction.
Last parameter is what you need, you must set it to 4.

By setting 4, engine will check if Beam and enemy's are in same animation or not. If not, Beam will be removed.

So this also mean you need to change animation name from IDLE to ATTACK6 in Beam's text to match enemy's animation. If enemy is hit, his/her animation will change and won't match Beam's animation and will remove itself

HTH
 
thanks :)
its working great...
the flag 4 also seems it could be used in other stuff
like making an enemy or vehicle using body parts...

so far iam using body parts on some enemy slams
to cover the back/front of the victim...

exemp1.gif

exemp2.gif




 
thanks  :D
i have a bunch of characters doing slam attacks

iam already making the final part of the game...
when its all done ill try to post some videos while i clean up the messy parts (enemy health to high / to many enemies / bad images / scripts / etc)...

but sometimes when i want to finish something... there are others that hold me back...
like today i had to format my disc and install windows again... whenever i used the internet my pc freezed and went back all weird i even had a blue screen... a couple a months ago my monitor was shunting down by itself whenever i restart the pc...

maybe using to many photoshop is killing my computer...!!!
For this reasons i made a bonus stage in the game were you have to break a giant computer and all computers in the room... 
 
save a copy of your project somewhere like dropbox, googledrive, skydrive
if i remember right someone loses his hard disk reporting the same problems you reported:P
so in any case just make a backup copy on those storage things, and if you hd crash you at least have your work safe
:P
 
not to worry much !!! iam saving the game to an external disc...
i also have 2 disks in the pc windowns in C: games in D:

but ive checked the disks a couple a days ago... no errors nothing...
memory looks fine / graphic card / cpu... no virus malware spyware...
its just one of those annoying things were everything is fine and you cant find any problem...

my internet just started doing the same thing it freezes for a moment then it comes back up... i think its something to do with framework.net packages that photoshop installs and adobe flash payer installs...

a couple of months i dindt had this.... what pixx me off is that is that i have to waste my time on this super windows microsoft shtxxx

 
:) king is the girlfried of mr karate...
ryo usually as troubles with kasumi shes a boss in one of the levels
shes coming at him with a baseball bat...

ive tried to make the game story a little equal to the AOF series 
 
Back
Top Bottom