how can i test what an entity that runs through a trigger's targetanme is?
example, the player runs throguh a trigger_multiple, which calls a thread that does a bunch of stuff, but only if the $targetname of the entity matches what it needs.
last used by trigger?
Moderator: Moderators
last used by trigger?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
spawn ur trigger and set thread to this and it should print nout the targetname of the thing that goes through it. If itsd a player it will just print player.
if u have a trigger multiple, what other then player are u checking for? other things without spawnflags wont set it off.
if u have a trigger multiple, what other then player are u checking for? other things without spawnflags wont set it off.
Code: Select all
triggerd_thread:
iprintln parm.other.targetname
end
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
i searched the forums and didnt find what i was lookin for.i know very little bout scripting.is it possible to have a server side mod,to when u get down to a certain health damage like 30 health and below,the player automatically drops his/her weapon?
or maybe a mod to when u get shot in a high kill area(like torso,belly,ect..)
the player drops to 1 knee.i noticed in SinglePlayer the AI's drop down..but i dont like how long,maybe have drop down for a second,or half a second.

or maybe a mod to when u get shot in a high kill area(like torso,belly,ect..)
the player drops to 1 knee.i noticed in SinglePlayer the AI's drop down..but i dont like how long,maybe have drop down for a second,or half a second.
ok, so parm.other.targetname would be the entity that passed throguh the trigger's targetname? thanks that all i needed to know 
@Beret:
those anims in SP arent supported in stock MP skins, you'd need toload the whole file for it, which is huge for a skin, and then you'd have to make camera jitters etc. all in all a bit too much work for a server side mod.
yea i suppose you could make a mod where a player drops his weapon whne he hits o so much hp...
but you'd also nede to make it so you could do that continually for new clients as well... hmmmz.. and keep in mind this code is far from perfect but i think it'd do what you wanted.
@Beret:
those anims in SP arent supported in stock MP skins, you'd need toload the whole file for it, which is huge for a skin, and then you'd have to make camera jitters etc. all in all a bit too much work for a server side mod.
yea i suppose you could make a mod where a player drops his weapon whne he hits o so much hp...
Code: Select all
testThread:
local.hasplayerDropped = 0
while($player.health > 30 && local.hasplayerDropped == 0)
{
waitframe
}
$player weapdrop
local.hasplayerDropped = 1
goto testThread
endModerator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006