- Joined
- Jun 20, 2004
- Messages
- 229
Think this would work with multiple players? Using locals in GUI still feels a bit weird to me so just asking. Just a simple mouse click and mouse release test for something like shooting an automatic weapon. I am also aware of the timer problem but not worrying about specifics. Just curious if this would be sufficient for multiple players. Maybe I should just stick with writing it myself...
I probably don't need a boolean for the mouse, but EventMouseClicked() doesn't work like EventKeyPressed() does as an integer. I think someone listed all the functions somewhere but I can't remember?
I probably don't need a boolean for the mouse, but EventMouseClicked() doesn't work like EventKeyPressed() does as an integer. I think someone listed all the functions somewhere but I can't remember?
Code:
Left Click
Events
UI - Player Any Player clicks Left mouse button Down.
Local Variables
player = (Triggering player) <Integer>
i = 0 <Integer>
Conditions
Actions
Variable - Set mouseLeft[player] = true
General - While (Conditions) are true, do (Actions)
Conditions
mouseLeft[player] == true
Actions
Variable - Set i = (i + 1)
Debug - Display ("Shoot Cycle " + (Text(i))) as debug output using Type 1, and Do display it in the game window
General - Wait 0.01 Real Time seconds
Code:
Left Release
Events
UI - Player Any Player clicks Left mouse button Up.
Local Variables
player = (Triggering player) <Integer>
Conditions
Actions
Variable - Set mouseLeft[player] = false