I know how to add a targetname to a spawned entity but how do I add additional keys-values to this same entity ?
Let me give you an example of what I know works and what doesnt...
//spawn the bomb
local.device = spawn script_model "targetname" "flak88_explode"
local.device model "items/pulse_explosive.tik"
local.device.origin = ( 802.00 -16.00 -106.00 )
local.device.angles = ( 0.00 180.00 0.00 )
local.device.scale = 1.0
local.device solid
This works just fine as is, but I want to add the following keys-values to this spawned entity....
key-value
target-flak88
$trigger_name-flak88_bomb
#exploder_set-1
I have tried this and it failed miserably, only the targetname worked...
//spawn the bomb
local.device = spawn script_model "targetname" "flak88_explode"
local.device = spawn script_model "target" "flak88"
local.device = spawn script_model "$trigger_name" "flak88_bomb"
local.device = spawn script_model "#exploder_set" "1"
local.device model "items/pulse_explosive.tik"
local.device.origin = ( 802.00 -16.00 -106.00 )
local.device.angles = ( 0.00 180.00 0.00 )
local.device.scale = 1.0
local.device solid
Anyone have any ideas how to add additional key-values to a spawned entity ?
G3mInI
Spawning entities with multiple keys/values....
Moderator: Moderators
yes, don't spaw a trillion of them when doing it. just do this..
mybomb.target = $blah
mybomb.set = 1
your entity is selected by it's taretname (mybomb) and it selects or creates a new key by the . thingie, thne the value is set by the = xxx.
mybomb.target = $blah
mybomb.set = 1
your entity is selected by it's taretname (mybomb) and it selects or creates a new key by the . thingie, thne the value is set by the = xxx.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
you added 4 keys already to it do it the same for the other keys
local.device = spawn script_model "targetname" "flak88_explode"
local.device model "items/pulse_explosive.tik"
local.device.origin = ( 802.00 -16.00 -106.00 )
local.device.angles = ( 0.00 180.00 0.00 )
local.device.scale = 1.0
local.device.target = flak88
local.device.trigger_name = flak88_bomb
local.device.exploder_set = 1
local.device = spawn script_model "targetname" "flak88_explode"
local.device model "items/pulse_explosive.tik"
local.device.origin = ( 802.00 -16.00 -106.00 )
local.device.angles = ( 0.00 180.00 0.00 )
local.device.scale = 1.0
local.device.target = flak88
local.device.trigger_name = flak88_bomb
local.device.exploder_set = 1
