HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with a "select n shoot" system

09-24-2003, 01:23 PM#1
Coffein
Ok, I'm making a little map where you can control a rifleman and whenever you click an enemy unit you shoot it.
But I cant find a way to detect which player selected that unit, some people in irc told me to use triggering Player but that only seems to work if you own the unit.

Thanks in advance
09-24-2003, 01:26 PM#2
Vexorian
I am sure that it is triggering player, otherwise my selection system wouldn't work, what event are you using, do you have waits there?
09-24-2003, 01:39 PM#3
Coffein
Copy of my trigger for player 2 (in GUI):


Zombie2 P2
Events
Unit - Zombie 0004 <gen> Is selected
Conditions
(Triggering player) Equal to Player 2 (Blue)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) Current gold) Greater than 0
Then - Actions
Set attacked_target[2] = Zombie 0004 <gen>
Unit - Make You 0032 <gen> face attacked_target[2] over 0.10 seconds
Animation - Play You 0032 <gen>'s attack animation
Special Effect - Create a special effect attached to the origin of attacked_target[2] using Objects\Spawnmodels\NightElf\NightElfBlood\NightElfBloodChimaera.mdl
Unit - Set life of attacked_target[2] to ((Life of attacked_target[2]) - 2.00)
Player - Add -1 to Player 2 (Blue) Current gold
Else - Actions
Game - Display to Player 2 (Blue), at offset (0.00, 0.00) the text: No ammo! Reload!
09-24-2003, 01:44 PM#4
Vexorian
I think you have to use Player - Selection event instead of Unit - Specific unit is selected
09-24-2003, 01:55 PM#5
Ant
Lol did I start a shooting fad?
Anyways, I think triggering player works... you might want to try again.

Anyway, I belief under Player Selection event there's a "Player One selects a unit"
So you should be able to determine WHO exactly selects it.
Also, Under conditions, there's a condition "Triggering Player" which should work.

You can also search for the thread "Operation: Moon bullet" or something. Just search "Moon bullet" in the map development forum and you won't get it wrong. The left click system is on the operation moon bullet itself. The right click system is on the last page by raptor. Dark storm or something.

I reccomend the right click system btw. Also, if the guy in your map is completely freely controlable, like he can move around freely and all... please note the following:
1) Arrow keys in multiplayer create lag
2) Mouse movement in First Person View is tedious and quite annoying for the average b.net *cough*.

Make gameplay innovative... with simple controls... and your game will be fine though.
Good luck on your map! PM me if you need help or feedback! I know quite a bit about things First Person and control triggers (well considering all there is to know only occupies "quite a bit").This also reminds me... will the guys in FPS mod please hurry :D or at least give us a release date :P
09-24-2003, 02:03 PM#6
Coffein
Ok I think that works, thanks