Page 1 of 1
Launching a rocket?
Posted: Thu Sep 04, 2003 2:04 am
by BirdsofaFeather
I'm making an obj map, and since the allies have to have a time limit in which to set the bomb anyway, I thought I'd make that time limit mean something. So the allies have to set the bomb on the rocket in 5 minutes, because in that amount of time the is set to blast off (yada yada yada, something like that). I was just wondering if anyone has tried to make a lauchable rocket before, and maybe what you did. There's only a few parts of the scripting that I don't know how to do:
- make a fire effect travel with the bottom of the rocket (I don't think this would look very good, but it's the only option I could think of)
- have triggers occur based on how much time is left (ie. launch the rocket at zero). I might just end up making a manual timer on this one if there's no way to trigger at certain time's relating to the obj timer.
- and one thing (this probably makes me sound like a noob), but I don't exactly recall how to move an object in script "up" (sorry about this one, i just plain forgot and I'm too tired to go search for a cmd list).
Anyway I'm mostly just looking for people's opinions, I don't want anyone to tell me exactly how to set the whole thing up if by chance you know (cause that's half the fun).
Posted: Thu Sep 04, 2003 2:50 am
by Alcoholic
Let's assume your rocket is a script_object or a script_model.
-You would have a fire effect travel with it like this:
Where $myfirefx is the properly placed fire fx.
-You would get things based on what time is left like this:
Code: Select all
local.timeleft = ((level.dmroundlimit * 60) - level.time)
So if the roundlimit was 5 minutes and 2 seconds passed, you would get a result of 298 seconds...
-You can make the rocket move up like this:
(change values accordingly)
Code: Select all
$myrocket moveup 1024
//EITHER
$myrocket speed 100
//OR
$myrocket time 10
$myrocket move
For the whole timelimit thing, lets say you want to wait for the final 10 seconds of the map. You can add this thread and start it under waittill roundstart:
Code: Select all
warning:
local.timeleft = ((level.dmroundlimit * 60) - level.time)
while (local.timeleft > 10) //so more then 10 secs left
{
//refresh the value so we can keep checking
local.timeleft = ((level.dmroundlimit * 60) - level.time)
waitframe //just holdon until our moment
}
//ok 10 seconds, count down
for (local.i = 10; local.i >= 1; local.i--) //this thing loops 10 times for us
{
iprintlnbold local.i
wait 1
}
iprintlnbold "0! Liftoff!"
//do whatever you want for launching your rocket
end

Posted: Thu Sep 04, 2003 8:22 pm
by General_DisArray
THATS SEEMS LIKE A COOL IDEA.
guess you would make it like the cut scenes after the tow games of berlin, flughaven, and drukkhammen.
interesting if it does work!
Posted: Thu Sep 04, 2003 8:23 pm
by General_DisArray
oops
Posted: Fri Sep 05, 2003 2:38 am
by Alcoholic
Yeah maybe make everyone watch a cutscene of the rocket taking off or something.
Kabooom
Posted: Fri Sep 05, 2003 3:42 am
by CorporalPunishment
I was going to include a launchable V2 in my new map.
I build a test map which has the allies able to call in a plane bombing, and axis can launch a v2.
After the trigger is used the V2 fires up and launches into the sky.
2 minutes later in comes back down in the middle of the map.
Massive damage, I put rings of AI guys in the test map so you can see the effect. Funny as hell to watch. The kill zone is about half the map. And the volume damage is firendly fire, so both teams have to be careful.
I made lots of custom fx by tweaking some of the original tiks.
Big fireball and huge black mushroom.
Anyway it looked cool but I'm not going to use it in my level. I ended up using all the custom FX on a grenade mod we use on the lan sometimes.
You drop the nade and run cos the blast damage is huge.
Posted: Wed Sep 10, 2003 6:23 pm
by BirdsofaFeather
WOW, thank you very much Alcoholic!
That definitly gives me a good starting point.
I just have one more question before I'm going to start experimenting with my script. I already have obj script in place like this:
Code: Select all
level waittill spawn
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
level.dmrespawning = 0
level.dmroundlimit = 4
level.clockside = axis
//level waittill roundstart (commented out for self-testing)
$v2_bomb thread global/obj_dm.scr::bomb_thinker
thread allies_win_bomb
$v2_bomb thread axis_win_timer
end
(then later in the script after a few miscelaneous things...)
Code: Select all
//----------------------
// Allied Victory Test
//----------------------
allies_win_bomb:
while (level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
//----------------------
// Axis Victory Test
//----------------------
axis_win_timer:
level waittill axiswin
end
is there a "level.(something)" that flips when the bomb is set? (like maybe something like "level.bombposition" = 1 when the bomb is set). I would just set it so that if 30 seconds are left until launch and the bomb is still set, I would abort the launch, but the axis could still win by killing all the allies or time running out before the bomb is set again. but to do that I would still need a checker of some sort to see if the bomb is set. I'm pretty sure I know how to script it, i just need to know if there is a checker for whether the bomb is set or not.
Also, does anyone know exactly how to do the cutscene thing without the spearhead expansion?
Thanks in advance.
