Page 1 of 1
Help explotion...
Posted: Sat Feb 25, 2006 6:27 pm
by Barttje
Hi all,
I'm trying to put an trigger somewhere and if i'm using it than it will explode over 15 seconds by the local.player... i have the trigger but and its working but the explosion doesn't work...
Here is my code...
level waittill prespawn
local.Bomboom = spawn script_model "targetname" "bom_boom"
local.Bomboom model "animate/fx_mortar_dirt.tik"
local.Bomboom.origin = local.player.origin
local.Bomboom.angles = ( 0 0 0 )
local.Bomboom.scale = 1
level waittill spawn
local.Bom = spawn trigger_use
local.Bom.origin = ( 2458 488 -495 )
local.Bom setsize ( -10 -10 -10 ) ( 10 10 10 )
local.Bom setthread Bom
local.Bom message "You bloody bastard"
local.Bom delay 0
end
Bom:
while(isAlive local.player)
{
$Bom waittill trigger
self nottriggerable
local.player = parm.other
local.player stufftext "say Oh no... I'm a bloody bastard, and can explode every moment!!!"
$player playsound plantbomb1
wait 15
$bom_boom anim start
$player hurt 9999
self triggerable
break
}
end
The yellow line is what I think what is wrong, but I don't know what i have to set... please tell me
TnX
parm.other
Posted: Sun Feb 26, 2006 1:24 am
by tltrude
The explosion does not know who local.player is. So, move all the red and yellow lines under where it say:
local.player = parm.other
and above the stufftext line.
Also change $player to local.player . If you add these lines after the explosion animation, it will seem more real.
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
By the way, everything you are looking for is in the global/minefield.scr script. And, the player will be thrown up into the air.
//*** minefield script
//*** The player enters the minefield, and within a short random amount of time
//*** if he's still in the minefield he'll blow himself up and crush his skull.
//*** This main thread is called by this script and should not be called by the
//*** level script itsself. The level script should call minefield_setup
//*** syntax ------------------------------------
//*** minefield <this is the index number for the array of minefield triggers>
Posted: Sun Feb 26, 2006 2:13 pm
by Barttje
Tnx tltrude ive learned from that

... he is doing it now

... but:
Bom:
while(isAlive local.player) //<-- this one isn't still doing it... if i do while(1) then he's doing it
{
$Bom waittill trigger
self nottriggerable
local.player = parm.other
local.player stufftext "say Oh no... I'm a bloody bastard, and can explode every moment!!!"
$player playsound plantbomb1
wait 15
$bom_boom anim start
$player hurt 9999
self triggerable
break
}
end
Posted: Sun Feb 26, 2006 4:02 pm
by Green Beret
I think the while is alive checks to see if the player is dead.
I would add that maybe at the end?
local.player
Posted: Sun Feb 26, 2006 4:26 pm
by tltrude
local.player is a variable and must have value before it is used. This line gives it value.
local.player = parm.other
Posted: Sun Feb 26, 2006 4:44 pm
by bdbodger
local.player = pram.other // <-- I think this should be parm.other

Posted: Sun Feb 26, 2006 7:16 pm
by Barttje
tltrude wrote:local.player is a variable and must have value before it is used. This line gives it value.
local.player = parm.other
you mean this?
Code: Select all
Bom:
local.player = parm.other
while(isAlive local.player)
{
$Bom waittill trigger
self nottriggerable
local.player stufftext "say Oh no... I'm a bloody bastard, and can explode every moment!!!"
local.player playsound plantbomb1
wait 15
local.Bomboom = spawn script_model "targetname" "bom_boom"
local.Bomboom model "animate/fx_mortar_dirt.tik"
local.Bomboom.origin = local.player.origin
local.Bomboom.angles = ( 0 0 0 )
wait .5
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
$bom_boom anim start
local.player hurt 9999
self triggerable
break
}
end
oh and BTW...
waitexec global/earthquake.scr
.3 1.5 0 0
waitexec global/earthquake.scr
.35 .75 0 0
what does it all means?
earthquake
Posted: Mon Feb 27, 2006 2:20 am
by tltrude
the earthquake lines should be after the animation line. Although, it is so fast you may not notice a difference. Here is what the numbers mean.
duration, magnitude, no_rampup, no_rampdown
Duration = how long it will last.
Magnitude = how strong the shaking is.
No_rampup = not sure, but could limit shaking as it builds to a peak.
No_rampdown = not sure, but could limit shaking as it fades away.
Btw, your english is bad in the message.
"Oh no!.. I'm a bloody bastard, and can explode at any moment!!!"
Posted: Mon Mar 06, 2006 6:25 pm
by Barttje
srry for my bad english, tnx for the good english and tnx for the explain of earthquake...
okeey i just completed the script and its working but
local.Bomboom = spawn script_model "targetname" "bom_boom"
local.Bomboom model "animate/fx_mortar_dirt.tik"
local.Bomboom.origin = local.player.origin
local.Bomboom damage = 999
local.Bomboom explosion_radius = 400
whats wrong, he isn't doing the damage...??????
Posted: Mon Mar 06, 2006 7:01 pm
by Barttje
nver mind... I figured it out...
tnx for help anyway
