Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Creating Bomb LWeapons

8 replies · 2,023 views · Started 06 May 2008

I've been playing with scripts that create bomb-type LWeapons, and they have some unusual characteristics. It appears that if you spawn a Bomb lweapon, it will borrow the attributes of whatever bomb the player has, regardless of whether the player was actually using bombs.

Is there a way to modify the attributes of a bomb placed by Screen->CreateLWeapon(6) or (7)? Can I change damage, timing, etc?

Also this is odd, but if you give a bomb Dir=0, damage, and step; Upon hitting an enemy it will respawn itself at the bottom of the screen and continue upward in an endless cycle so long as it keeps impacting enemies. (Works only with DIR_UP like this)

That doesn't seem possible. LWeapon bombs do not 'hit' enemies, even if their Damage is set.

_L_ wrote:That doesn't seem possible. LWeapon bombs do not 'hit' enemies, even if their Damage is set.

Are you sure about that?

					lweapon laser = Screen->CreateLWeapon(LW_BOMB);
laser->X=lx;laser->Y=ly;
if(Link->Dir==0)laser->Dir=0;
else if(Link->Dir==1)laser->Dir=1;
else if(Link->Dir==2)laser->Dir=2;
else if(Link->Dir==3)laser->Dir=3;

laser->Step=2;
laser->Damage=2;
laser->CSet=6;

Plus they never explode like this...but I didn't set 'deadstate' on them either. That could be why.

Thats cool and all, but I'm just wondering if there's a way to set bomb attributes when the LWeapon is created, or failing that, where exactly the bomb LWeapon goes to find things like its fuse duration.

Oh, sorry about that. To sum up...I have no friggin idea. :P Apparently if you layer them on top of eachother..(which wasn't supposed to happen) then they explode...sometimes. And If you don't stop bombs from going outside the screens borders they will accumulate there and slow down zc to about 10 fps. So in closing, let me say this; If you can understand any of this, then canuplease explainittome!!

The bombs are kind of buggy it seems...

Sorry for the double double, but I still can't get the bombs working, so I'm assuming C-Dawg that you're still having the same trouble.

Has anyone triggered their explosions sucsessfully? ...jman2050, does Deadstate apply to LW_BOMBS?

All I can tell is that the bomb spawned by LWeapon seems to be related to the bomb your character has in their inventory.

Alright, here's what is happening.

If you spawn an LWeapon bomb (or superbomb), you don't get to choose what LEVEL of LWeapon bomb spawns. The engine apparently looks to whatever level of bomb the player is carrying around and spawns that. Not sure why it should be that way, but it is.

Problem is, I can't work around this without giving up bombs or super bombs entirely. For instance, I could give the player Level 1 bombs that go off instantly (which is what you need for missiles), but not let the player select them on the subscreen. Then I could make a new item that spawns a bomb - but there's no way to stop this new item from spawning exactly the same sort of bomb.

Seems odd that we can't control what kind of bomb gets spawned as an LWeapon, huh...