| 07-17-2004, 07:28 AM | #1 |
I'm having trouble getting this to work,, there seems to be an error in the code somewhere... Now i have one of each type of these triggers for each of the 8 players. it seems like it should work.. but i think it has trouble targeting your hero unit.. Code:
update p1
Events
Time - Every 0.75 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Camera - Apply third person view p1 <gen> for Player 1 (Red) over .75 seconds.
Camera - Lock camera target for Player 1 (Red) to (Matching unit), offset by (0.00, 0.00) using Default rotation
Camera - Change camera smoothing factor to 30,00
Wait 0.50 secondsCode:
tun 3rd person on p1
Events
Player - Player 1 (Red) types a chat message containing /3rdperson on as An exact match
Conditions
Actions
Trigger - Turn on update p1 <gen>
Trigger - Turn on up p1 <gen>
Trigger - Turn on down p1 <gen>
Trigger - Turn on Left p1 <gen>
Trigger - Turn on right p1 <gen>
Trigger - Turn on Stop going up p1 <gen>
Trigger - Turn on Stop going down p1 <gen>
Trigger - Turn on Stop coing left p1 <gen>
Trigger - Turn on Stop going right p1 <gen>Code:
tun 3rd person off p1
Events
Player - Player 1 (Red) types a chat message containing /3rdperson off as An exact match
Conditions
Actions
Trigger - Turn off update p1 <gen>
Trigger - Turn off up p1 <gen>
Trigger - Turn off down p1 <gen>
Trigger - Turn off Left p1 <gen>
Trigger - Turn off right p1 <gen>
Trigger - Turn off Stop going up p1 <gen>
Trigger - Turn off Stop going down p1 <gen>
Trigger - Turn off Stop coing left p1 <gen>
Trigger - Turn off Stop going right p1 <gen>
Camera - Reset camera for Player 1 (Red) to standart game-view over 0.75 secondsAnd the hero movement codes (Not sure if they work cause I cant get the camera on the hero.. so they may work. Code:
up p1
Events
Player - Player 1 (Red) Presses the Up Arrow key
Conditions
Actions
Unit - Order (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to Move to ((Position of (Matching unit)) offset by (0.00, 9999.00))
Trigger - Run Turn off every thing p1 <gen> (ignoring conditions)
Trigger - Turn on Stop going up p1 <gen>Code:
Stop going up p1
Events
Player - Player 1 (Red) Releases the Up Arrow Key
Conditions
Actions
Unit - Order (Random unit from (Units oqned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to StopCode:
Left p1
Events
Player - Player 1 (Red) Presses the Left Arrow key
Conditions
Actions
Unit - Order (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to Move to ((Position of (Matching unit)) offset by (-9999.00, 0.00))
Trigger - Run Turn off every thing p1 <gen> (ignoring conditions)
Trigger - Turn on Stop going left p1 <gen>Code:
Stop going left p1
Events
Player - Player 1 (Red) Releases the Left Arrow Key
Conditions
Actions
Unit - Order (Random unit from (Units oqned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to StopCode:
right p1
Events
Player - Player 1 (Red) Presses the Right Arrow key
Conditions
Actions
Unit - Order (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to Move to ((Position of (Matching unit)) offset by (9999.00, 0.00))
Trigger - Run Turn off every thing p1 <gen> (ignoring conditions)
Trigger - Turn on Stop going right p1 <gen>Code:
Stop going right p1
Events
Player - Player 1 (Red) Releases the Right Arrow Key
Conditions
Actions
Unit - Order (Random unit from (Units oqned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to StopCode:
down p1
Events
Player - Player 1 (Red) Presses the Down Arrow key
Conditions
Actions
Unit - Order (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to Move to ((Position of (Matching unit)) offset by (000, -9999))
Trigger - Run Turn off every thing p1 <gen> (ignoring conditions)
Trigger - Turn on Stop going right p1 <gen>Code:
Stop going down p1
Events
Player - Player 1 (Red) Releases the Down Arrow Key
Conditions
Actions
Unit - Order (Random unit from (Units oqned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) to StopCode:
Turn off every thing p1
Events
Conditions
Actions
Trigger - Turn off Stop going down p1 <gen>
Trigger - Turn off Stop going left p1 <gen>
Trigger - Turn off Stop going right p1 <gen>
Trigger - Turn off Stop going up p1 <gen> |
| 07-17-2004, 11:31 AM | #2 |
Hello, I'm not 100% sure, but you might want to change: Camera - Lock camera target for Player 1 (Red) to (Matching unit), offset by (0.00, 0.00) using Default rotation to Camera - Lock camera target for Player 1 (Red) to (PICKED UNIT), offset by (0.00, 0.00) using Default rotation because I think Matching Unit is only used in conditions and not actions. If each player only has one Hero, I suggest you assign that unit to a variable and refer to that in your triggers rather than using the Random unit from unit group and Pick all units matching conditions functions. If you're interested in making a third person map, you should try the FPS Mod (found on the home page). Cheers and hope I haven't been too far off. -Thunder |
| 07-17-2004, 02:42 PM | #3 |
Camera locks on fine.. but dosnt follow behind the unit.. not sure how to do this. any suggestions? |
| 07-17-2004, 02:44 PM | #4 |
you have a cosntantly running (1 second periodic timer) trigger that sets the rotation of the camera to the facing angle of the palyer's unit. |
| 07-17-2004, 02:45 PM | #5 |
hmm.. setting it to use the units rotation dosnt seem to help... any ideas? |
| 07-17-2004, 02:51 PM | #6 |
alright.. i'll try that |
| 07-17-2004, 02:59 PM | #7 |
im not having much luck heh |
| 07-17-2004, 05:57 PM | #8 |
ugg.. cant get the movement to be bassed off the facing of matching unit.. rather then the x,y axis... how would i do this? Also I got the camera to rotate with the player but its choppy as all hell... |
| 07-17-2004, 06:12 PM | #9 |
Well, then make the periodic trigger occur faster. There are pre-built camera systems available in the trigger repository I think. In anycase, the problem is inherent to this kind of camera view, the game simply is NOT designed to be used like this and you're going to have to accept relatively poor performance as a result. |
