Bind exploder, chunk, etc.. to a moving script_origin

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Bind exploder, chunk, etc.. to a moving script_origin

Post by Ric-hard »

Hi :D , I wonder if its possible to find a exploder, exploderchunk, exploderfire in my script by their #set?s and then bind them to a moving script_origin.

It is for a V2-rocket that is being transported out to its launchpad and then launches, it shall be able to explode in the air if the axis fails to defuse it.
Image
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

done

Post by tltrude »

That has already been done before. Click on my sig logo and download "Gotterdamerung".

Basically, you have to forget about using the exploder script, and do it all in your main script. And, You can bind the explosion entities to the rocket--just like you did for the fire and smoke.
Tom Trude,

Image
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

Thanks tltrude,
may I ask why the exploder-script cant be used?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

exploder

Post by tltrude »

When you execute the exploder script it creates things that wont be bound to the rocket. So, although, the rocktet may take off, the explosion and stuff will still happen on the ground.
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i know this is WAY offtopic, but that looks SP (love it already) and what's with the words on the side?
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

Thanks,
anyone who knows if I can toggle an exploder to be hidden or shown in my script?

And Tltrude, can I use your launch-sound that u use in your map Gotterdammerung?, I havent decided if I shall make it launchable yet though (Iv? already rigged an explosion with the exploder-script), I might implement it in a later beta-version though.

I dunno what SP means but I guess its a good thingie, thanks.
The hudtext is to inform about which gametype it is, Liberation or the traditional blow things up obj, or both at the same time, it also informs about some other stuff, If allies and axis medic-bot is in the game and if they are hostile or not, if the bleeding-script is on, if the selfhealing-script is on, if teambalance-script is on, how many players are in jail, etc...
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Here is how to hide/show/solidify ( for a different purpouse, but the same code is valid ) : http://gronnevik.se/rjukan/index.php?n= ... ingObjToDm
Last edited by Bjarne BZR on Mon May 01, 2006 8:48 pm, edited 1 time in total.
Admin .MAP Forums
Image
Head above heels.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

Ric-hard wrote:I dunno what SP means but I guess its a good thingie, thanks.
The hudtext is to inform about which gametype it is, Liberation or the traditional blow things up obj, or both at the same time, it also informs about some other stuff, If allies and axis medic-bot is in the game and if they are hostile or not, if the bleeding-script is on, if the selfhealing-script is on, if teambalance-script is on, how many players are in jail, etc...
SP is Single Player, i saw teh guys hunched over in the SP AI pose so i thought you'd made it SP, but that's cool as-is!

nice map so far ;)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

launch sound

Post by tltrude »

Sure, you can use that sound--we stole it from the internet anyway.
Tom Trude,

Image
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

Hm, I tested to bind my exploderthingies to the moving v2_script_origin and it seems to work pretty fine as long as I dont use any exploderchunks, which is ok for me at this stage.
Thanks for all help

v2_exploder_preparation:
for (local.i = 1; local.i < level.exploders+1; local.i++)
{
if (level.exploder[local.i].set == 22)
{
level.exploder[local.i] bind $v2_origin
level.exploder[local.i] notsolid
}
}
end

v2_exploderfire_preparation:
for (local.i = 1; local.i < level.exploderfires+1; local.i++)
{
if (level.exploderfire[local.i].set == 22)
{
level.exploderfire[local.i] bind $v2_origin
}
}
end
Post Reply