HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

First person trigger help needed

11-04-2007, 12:13 PM#1
Draco_9000
Im trying to make a first person movement game and i have the camera and everything but when ever i press th up arrow my selected unit goes to the right. i set it upp with 3 bolean variables (up,left,right) so when i press whatever arrow key they are they equal true and when i release it they equal false. i just need someone to inspect my trigger

Trigger:
movemant
Collapse Events
Time - Every 0.20 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
up Equal to True
right Equal to False
left Equal to False
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Move To ((Position of (Picked unit)) offset by 200.00 towards (Facing of (Picked unit)) degrees)
Skip remaining actions
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
right Equal to True
up Equal to True
left Equal to False
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Move To ((Position of (Picked unit)) offset by 200.00 towards ((Facing of (Picked unit)) - 10.00) degrees)
Skip remaining actions
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
left Equal to True
right Equal to False
up Equal to True
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Move To ((Position of (Picked unit)) offset by 200.00 towards ((Facing of (Picked unit)) + 10.00) degrees)
Skip remaining actions
Collapse Else - Actions
Skip remaining actions


If you find the error please either comment or email me at [email protected]
11-04-2007, 12:47 PM#2
CommanderZ
There is a FPS template in hosted projects on this website, you may want give it a look.

Even if you managed to make the movement, your trigger is going to be terribly leaky.

If you want to go on your way you should post here also the trigger which sets the boolean values. This one seems to be funcionally alright to me.
11-04-2007, 05:16 PM#3
Salbrismind
It looks okay, but the skip remaining actions are pointless especially on the bottom actions.
11-06-2007, 01:52 AM#4
Draco_9000
well i thought it would work but when i tested it when i pressed forward my unit started moving the forward+right movement

------------------------------------------------------------------------------------------------------------------------------------------------When life hand you lemons stop complaining and thank life for free stuff!
11-06-2007, 01:57 AM#5
Draco_9000
Quote:
Originally Posted by CommanderZ
There is a FPS template in hosted projects on this website, you may want give it a look.

Even if you managed to make the movement, your trigger is going to be terribly leaky.

If you want to go on your way you should post here also the trigger which sets the boolean values. This one seems to be funcionally alright to me.
looked at that and based this off of this but im not that good with triggers and i dont know what half of those things do.
WTF does "for loop integer a/b" mean anyways?
11-06-2007, 02:47 AM#6
Salbrismind
Quote:
Originally Posted by Draco_9000
looked at that and based this off of this but im not that good with triggers and i dont know what half of those things do.
WTF does "for loop integer a/b" mean anyways?

If you know what a variable is, think of it like that. So when I have a For loop A 1-4 it will run 4 times each time setting "For Loop A" to of the numbers between 1 and 4. The first time it runs through it will be 1, second 2, third 3, fourth 4. Within the loop you can set certain integers to be "For Loop A" thus making it the number as it runs through.

For Loop A 1-3
x = For Loop A

Then First time x will be 1
second x = 2
third x= 3



To help with your main question, well can you show us your other triggers. The ones that set up, down, left, right to true or false. Chances are this is where you messed up.