Storm Shield

esn23

Active member
Okay so I wanted to create a lightning shield around storm for my game.  The idea of it was if an enemy gets to close they get shocked which was the easy part.  But then I also wanted all gunners and people that shot projectiles to hit the shield and not storm.  The idea was the shield would have life and once the life was gone the shield would vanish or once the time ran out.  So I decided to use spawnbind with the shield being another entity and have it be declared as in npc so it could get hit etc.  But when i spawnbind it as an npc it wont appear.  Is there another way to do the desired effect that I want for the shield?  Any help would be great thanks.  BTW here is what i did for the entity

name shield
type npc
life 25
lifespan 25
alpha 6
setlayer 150
palette none
candamage enemy obstacle



anim idle
loop 1
offset 56 94
bbox 23 20 87 96
        delay 4
shock 41 17 48 33 5 0 0 0 0 0
        frame data/chars/storm/shield/1.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 32 13 72 102 5 0 0 0 0 0
        frame data/chars/storm/shield/6.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
        shock 0 0 0 0 0 0 0 0 0 0

and in storm i used the spawn bind command.  It was working till i delcared the above as npc
 
My suggestion is:

Change the IDLE anim for SPAWN anim, and make it loop. As BB said, "if you spawn enemies and NPCs which haven't touched ground yet, they won't act at all. "

 
Bloodbane said:
I've figured the cause of this problem esn and it has nothing to do with shield itself. I'll post the details in Atlas forum :)

Guys, its always polite to post the solution here too, or at least the link, if you post the question here.
Its the second time I see this behaviour and I strongly disagree with that. Sounds very impolite/unpolite. Please, don't do this.

esn, I've just figured out why her shield doesn't work. It's because there's a enemy's script which set candamage to player only to their projectiles. I've fixed this so now the latter can hit npcs and obstacles as well.
 
esn23 posted his problems in 2 forums and PMs too. It gives me dilemma whether to answer only in PM or in one forum and ignore the others OR copy the answer and post them there and have esn23 read all of them
 
It's my fault I posted this here and then pmed bloodbane over at atlas.  Sorry bloodbane :(  I know your not on all the time so I posted over here after I asked you to see if I could get a quick answer it wont happen again :)
 
O sorry the answer was it was a script that was conflicting with what i was trying to do it was a damage script thing for the enemies that would make them only damage chars and not npcs.
 
i trying to develop a fire shield for sunfire, and i think this system can work on my project too, can i have acess to the file and borrow it to my xmen game? :P

the way im doing it is not the best way im sure,
i did a copy of sunfire and used as weapon and binded the flame effect in all animations

[attachment deleted by admin]
 
yea sure use this

name shield
type npc
life 35
lifespan 35
alpha 6
setlayer 150
palette none
candamage enemy obstacle



anim idle
loop 1
offset 56 94
bbox 23 20 87 96
        delay 4
shock 41 17 48 33 5 0 0 0 0 0
        frame data/chars/storm/shield/1.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 32 13 72 102 5 0 0 0 0 0
        frame data/chars/storm/shield/6.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
        shock 0 0 0 0 0 0 0 0 0 0
 
anim spawn
loop 1
offset 56 94
bbox 23 20 87 96
        delay 4
shock 41 17 48 33 5 0 0 0 0 0
        frame data/chars/storm/shield/1.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 32 13 72 102 5 0 0 0 0 0
        frame data/chars/storm/shield/6.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 24 14 82 101 5 0 0 0 0 0
        frame data/chars/storm/shield/5.png
        shock 0 0 0 0 0 0 0 0 0 0
        shock 23 20 87 96 5 0 0 0 0 0
        frame data/chars/storm/shield/4.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 17 87 82 5 0 0 0 0 0
        frame data/chars/storm/shield/3.png
shock 0 0 0 0 0 0 0 0 0 0
        shock 23 16 80 66 5 0 0 0 0 0
        frame data/chars/storm/shield/2.png
        shock 0 0 0 0 0 0 0 0 0 0

You might want to tweak it to your liking.  Make sure that all enemies can damage npcs and thats it :P
 
my openbor does not regonize
life 35
only health 35

i think my bind entity works different than yours mine only display the bind while are in the same animation you binded
there is no script to control the damage taken to vanish shield instead of this life 35?
what openbor build you are using in your project by the way?

i think bloodbane are in his Ramadhan period so maybe can take while until we discovered what is missing on this system
can you show me how you call this npc on storm? i pretty sure your bind code are different than mine i supose
 
life was a typeo lol im using the spawnbind function i can check my scripts folder,  Im using the last updated xbox version i can check give me  abit
 
rafhot said:
i think bloodbane are in his Ramadhan period so maybe can take while until we discovered what is missing on this system

Ramadhan is over a month ago and even if it were Ramadhan, I'm still active in forum as usual :)

Back to topic, this shield is effective against projectiles which are removed after hitting something. Against pierce through projectiles, it's not effective at all. You need script in the latter to remove them when they hit this shield
 
Oh sorry I diddn't see rafhot's post.

Code:
void spawnBind2(void Name, float dx, float dy, float dz)
{ // Spawn and bind other entity
   void self = getlocalvar("self");
   void Spawn;

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

This script also requires spawn01
 
Back
Top Bottom