Talk:Targetname

From Valve Developer Community
Revision as of 15:22, 23 December 2006 by Angry Beaver (talk | contribs)
Jump to navigation Jump to search

Flashlight on at start of round (CS:S)

Could someone tell me how to make it so, that, in CS:S, at the start of every round, only the flashlights of the CT are ON. So:

  • At the start of a round, flashlights on
  • Only the one of CT's

I already figured out that you can select all players by making a Logic_auto and set OnMapSpawn, and the target to player. Thanks in advance! --CrabbyData 08:10, 13 May 2006 (PDT)

You would need to use a logical statement of if player team = counter, or similar. I'm not sure that that's possible though. --TomEdwards 08:33, 13 May 2006 (PDT)
Where should I put that? Because, I can't alter everybody's CS:S source-code to make that work... --CrabbyData 09:01, 13 May 2006 (PDT)
That's why I don't know if it's possible. --TomEdwards 09:04, 13 May 2006 (PDT)
Does CS:S support filters for trigger brush entities? That would presumably be the best way of setting up this kind of if statement. How do you go about turning on a player's flashlight for them though? point_clientcommand? --Giles 09:21, 13 May 2006 (PDT)
Perhaps the filtering would be unnecessary though, if you just stretched a trigger around the appropriate player starts and then had it delete itself after it did its job ... --Giles 09:24, 13 May 2006 (PDT)
Filtering would be nessicary because not all of them would be used. Actually you might want to find a way to delete them all after all of the team members have been spawned because having any left over because there weren't enough players on the team would cause a CT walking through one to turn their flashlight on again even though it had been turned off. But since everyone spawns at once, you could have each delete all the rest after a 1sec delay or something. --AndrewNeo 09:41, 13 May 2006 (PDT)
Thanks for all your help guys :D I'll test somethings out, with your ideas, and see if it works. Update in a sec... (I think I'll go for a triggering brush (invisible ofcourse) for every player start (so 2 inf_player_counterterrorist = 2 trigger_proximity (or something else))
Sorry, the last post was from me... I figured it out! Click here to read my (mini) tutorial (including sample map). Sorry for the late reaction, but I had dinner and there were some very good tv-shows on the tellie ^^ And I had a good sleep ;) --CrabbyData 02:13, 14 May 2006 (PDT)

References

!player and !activator, generally all the special keywords can be seen as references to other entities. I'm currently trying to award a player points for shooting a physics prop into a certain spot (trigger_multiple), but this physics prop is seen as the !activator, not the player who fired it, so when the trigger_multiple triggers the game_score, no points are awarded to the player. So I wondered, is there a way to somehow store references to entities? E.g. when the player picks up the prop, the prop stores a reference to this player, which can then be referred to later when applying score. Can this currently be done?

I'm not sure of your use here but !player has all the info about special targets like that. --Angry Beaver 14:22, 23 Dec 2006 (PST)