Page 1 of 1

trigger wont trigger

Posted: Mon Mar 07, 2005 12:24 am
by Master-Of-Fungus-Foo-D
My trigger_multiple jsut wont trigger! Im making a thing where you hit a tirgger, the bomb attatches to the buys head nad he goes and runs int oa dude and he explodes and gets a lot of kills...

well heres the script..(updated)

Code: Select all

suicide_bomber:
local.suicidestat = spawn animate/pulse_explosive_pickup.tik
local.suicidestat.origin = (  )
local.suicidestat.angles = (  )
local.suicidestat.scale = 5
//local.suicidestat rotatey 90   }\
//local.suicidestat rotatex 120 } problematic... edited out
//local.suicidestat rotatez 70   }/
///////////////////////////////////////////////////////////
local.suicidestatlight = spawn fx/dummy.tik 
local.suicidestatlight.origin = local.suicidestat.origin
local.suicidestatlight light 1 1 0 500
local.suicidestatlight lighton
////////////////////////////////////////////////////////
local.suicidetrigga = spawn trigger_use
local.suicidetrigga.origin = local.suicidestat.origin
local.suicidetrigga setsize ( 100 100 100 ) ( -100 -100 -100 )
local.suicidetrigga setthread suicide_playa
end 
//////////////////////////////////////////////////////////////////


suicide_playa:
/////////////////////////////////////////////////////
local.bomberhead = parm.other
local.bomberhead.targetname = bomberhead
//////////////////////////////////////////////////////////
if (local.bomberhead.suicideon != 1) 
{ 
local.bomberhead.suicideon = 1 
local.static = spawn script_model 
local.static model "items/explosive.tik" 
local.static notsolid 
local.static.scale= 3 
local.static.origin = (local.player.origin + ( 0 0 96 ))  
local.static glue local.bomberhead
if ( local.bomberhead.dmteam == allies )
{
local.bomberhead stufftext "say ********WE'VE GOT ANOTHER ALLIED BOMBERHEAD ON THE LOOSE***********!!!! " 
}
if ( local.bomberhead.dmteam == axis )
{
local.bomberhead stufftext "say ********WE'VE GOT ANOTHER AXIS BOMBERHEAD ON THE LOOSE***********!!!! " 
}
////////////////////////////////////////////////////////////////////
local.locotrig = spawn trigger_multiple
local.locotrig.origin = local.bomberhead.origin
local.locotrig setsize ( 82 82 82 ) ( -82 -82 -82 )
local.locotrig setthread killradius
////////////////////////////////////////////////////////////////
while( local.bomberhead.health == 0 )
 {
 local.bomberhead.suicideon = 0 
 local.static remove
 local.locotrig remove
 }
end
}
////////////////////////////////////////////////////////////////////
killradius:
if (parm.other.dmteam != $bomberhead.dmteam ) 
{
local.blastrigger = spawn trigger_multiple
local.blastrigger.origin = $bomberhead.origin
local.blastrigger setsize ( 1000 1000 1000 ) ( -1000 -1000 -1000 )
local.blastrigger volumedamage 10000
}
end
////////////////////////////////////////////////////////////////
ok.. the $Sstat spawns ok...
the light... yes it wokrs
but the suicide trigger doesnt seem to go off... could you tell me why?
my thread suicide_bomber is after prespawn
PS to all you eople annoyed at me:
ill shuttap ok?
im just about as stupid as the guy in my avatar looks :P

Posted: Mon Mar 07, 2005 1:11 am
by MPowell1944
local.static.origin = (local.bomberhead.origin + ( 0 0 96 ) )

should be

local.static.origin = local.bomberhead.origin + ( 0 0 96 )

***

local.blastrigger.origin = ( $bomberhead.origin )

should be

local.blastrigger.origin = $bomberhead.origin

Posted: Mon Mar 07, 2005 1:28 am
by Master-Of-Fungus-Foo-D
k thx... i ll try thaat now :)

Posted: Mon Mar 07, 2005 2:47 am
by Master-Of-Fungus-Foo-D
nope.. i get the same effect as before.. nothin...
is that while loop ok? ive never really used while before :S

i open up devcon and there arent any errors....
**edit**ive updated the script**/edit**

Posted: Mon Mar 07, 2005 6:24 am
by Grassy
local.suicidetrigga.origin = local.suicide_stat_1.origin

shouldn't it's origin = local.suicidestat.origin ? where did the _1 come from?

Posted: Mon Mar 07, 2005 9:25 am
by wacko
?tleast

Code: Select all

local.blastriggersetsize
is a typo.
You could add lines of

Code: Select all

iprintln_noloc "Script is now in thread xy"
to see more of what it does

Posted: Mon Mar 07, 2005 12:49 pm
by Master-Of-Fungus-Foo-D
ive updated the code and im testing with the correctins.. thx guys :)

Posted: Mon Mar 07, 2005 3:05 pm
by Rookie One.pl
1. I don't think giving players targetnames is a good idea, especially when you don't use them at all.
2. Glueing the bomb to the player will make it appear at his feet. Use bind or attach instead.

Posted: Mon Mar 07, 2005 6:43 pm
by Green Beret
so im assuming you can bind/attatch objects to players heads,arm ect...?

Posted: Mon Mar 07, 2005 7:19 pm
by Master-Of-Fungus-Foo-D
could i attatch it using the player's eyebone?

Posted: Mon Mar 07, 2005 7:36 pm
by Rookie One.pl
I think so.
Game classes reference wrote:attach( Entity parent, String tagname, [ Integer use_angles ] )

attach this entity to the parent's legs tag called tagname
So, you could use it like this:

Code: Select all

$entity attach local.player "eyes bone"

Posted: Tue Mar 08, 2005 5:44 am
by Grassy
Here's a list of body parts for you :)

//------------------------
Human body parts
//------------------------
Bip01 L Hand
Bip01 R Hand

Bip01 L Forearm
Bip01 R Forearm

Bip01 L UpperArm
Bip01 R UpperArm

Bip01 L Clavicle
Bip01 R Clavicle

Bip01 Head

Bip01 Spine
Bip01 Spine2

Bip01 Pelvis

Bip01 L Thigh
Bip01 R Thigh

Bip01 L Calf
Bip01 R Calf

Bip01 L Foot
Bip01 R Foot

Grassy

** Edit **

Here is one way of attaching something to a certain spot on a player that I use.

local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin = ( local.player gettagposition "Bip01 Head")
local.mover.angles = local.player.angles
local.mover notsolid
local.mover targetname "spot"
$spot attach local.player "Bip01 Head"

Posted: Tue Mar 08, 2005 1:52 pm
by Rookie One.pl
That's exactly what I meant, Grassy, thanks for an example. ;)

Posted: Sat Mar 12, 2005 2:18 pm
by Master-Of-Fungus-Foo-D
after this long time i fanally figure out thr problem... the setsize needs to be:

Code: Select all

(-### -### -###) (+### +### +###)
lol...
oh and whoever made the game code, cant spell attatch :wink: