| 11-06-2004, 02:16 AM | #1 |
Is it possible to make a unit (the main character of this specific RPG) to move with the arrow keys? If so, how? |
| 11-06-2004, 03:54 AM | #2 |
Look throught the events <_< Keep in mind if your unit attacks they player can use the attack command to move around without the arrows. |
| 11-06-2004, 04:47 PM | #3 | |
Quote:
Thanks but I still need to know the triggers/variables/regions involved |
| 11-06-2004, 06:19 PM | #4 |
Guest | heres a very basic trigger so you can gett he idea: Code:
Untitled Trigger 002
Events
Player - Player 1 (Red) Presses the Up Arrow key
Conditions
Actions
Unit - Order [color=Red]THEUNIT[/color] to Move To ((Position of ([color=Red]THEUNIT[/color])) offset by (0.00, 100.00)) |
| 11-06-2004, 06:45 PM | #5 |
It just so happens that I just recently made a trigger to do exactly this... here's the code for moving forward (two triggers are involved)... I know it's long, but I wasn't going to change it just for you (it does work, hope u understand what's going on) Code:
Forward
Events
Player - Player 1 (Red) Presses the Up Arrow key
Player - Player 2 (Blue) Presses the Up Arrow key
Player - Player 3 (Teal) Presses the Up Arrow key
Player - Player 4 (Purple) Presses the Up Arrow key
Player - Player 5 (Yellow) Presses the Up Arrow key
Player - Player 6 (Orange) Presses the Up Arrow key
Player - Player 7 (Green) Presses the Up Arrow key
Player - Player 8 (Pink) Presses the Up Arrow key
Player - Player 9 (Gray) Presses the Up Arrow key
Player - Player 10 (Light Blue) Presses the Up Arrow key
Conditions
Actions
Set Moving_Forward[(Player number of (Triggering player))] = True
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Moving_Forward[(Player number of (Triggering player))] Equal to True
Then - Actions
Unit - Set PlayerHero[(Player number of (Triggering player))] movement speed to ((Current movement speed of PlayerHero[(Player number of (Triggering player))]) + 5.00)
Unit - Order PlayerHero[(Player number of (Triggering player))] to Move To ((Position of PlayerHero[(Player number of (Triggering player))]) offset by 250.00 towards (Facing of PlayerHero[(Player number of (Triggering player))]) degrees)
Game - Display to (All players) the text: (Current Speed = + (String((Current movement speed of PlayerHero[1]))))
Wait 0.50 seconds
Else - Actions
Skip remaining actionsCode:
Forward Release
Events
Player - Player 1 (Red) Releases the Up Arrow key
Player - Player 2 (Blue) Releases the Up Arrow key
Player - Player 3 (Teal) Releases the Up Arrow key
Player - Player 4 (Purple) Releases the Up Arrow key
Player - Player 5 (Yellow) Releases the Up Arrow key
Player - Player 6 (Orange) Releases the Up Arrow key
Player - Player 7 (Green) Releases the Up Arrow key
Player - Player 8 (Pink) Releases the Up Arrow key
Player - Player 9 (Gray) Releases the Up Arrow key
Player - Player 10 (Light Blue) Releases the Up Arrow key
Conditions
Actions
Set Moving_Forward[(Player number of (Triggering player))] = False
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Moving_Forward[(Player number of (Triggering player))] Equal to False
(Current movement speed of PlayerHero[(Player number of (Triggering player))]) Greater than or equal to 75.00
Then - Actions
Unit - Set PlayerHero[(Player number of (Triggering player))] movement speed to ((Current movement speed of PlayerHero[(Player number of (Triggering player))]) - 5.00)
Game - Display to (All players) the text: (Current Speed = + (String((Current movement speed of PlayerHero[1]))))
Wait 0.50 seconds
Else - Actions
Skip remaining actions
|
