| 11-16-2002, 01:59 PM | #1 |
Anyone can post a tutorial on how to do a hard trigger or other map releated things in here if they want. Even better if its original stuff that you made yourself. Here's mine. [glow=strength=6,color=skyblue]PRESS BUTTONS TO MOVE AROUND (THE ITEM WAY)[/glow] We will be making the unit move up when pressing A. The unit we are moving is MARINE 001 Step 1: Create an item shop where you can buy one item (it would be more if you are moving in multiple directions, but for this tutorial, we will be making one direction) Step 2: Create a custom item. It doesn’t matter what it does, as long as it has "A" as a hotkey, and you can buy it. Make sure it has no restock time, and the stock is 10. We will call the item move right. Make sure you show the player the hotkey. Step 3: Make a hero near the shop. Make its movement speed 0 and make all the movement type NONE. Now it can't move. Step 4: Time to make the triggers. Trigger 1 Event: ----Unit – A unit owned by (Player 1) Acquires an item Condition: ----(Item Type of (Item being manipulated)) equal to Move Right Action: ----Set Y = (Y of (position of MARINE 001)) ----Set EndDest = (Position of MARINE 001) ----Set X = (X of (EndDest)) ----Set X = (X + 100) ----Set EndDest = (Point (X, Y) ----Unit – Order MARINE 001 to face EndDest ----Unit – Order MARINE 001 to move to EndDest ----Item – Remove (Item being manipulated) VARIABLES Y – Type: Real X – Type: Real EndDest – Type: Point Note: To move in other directions, do as follows: Left: Change [----Set X = (X + 100)] to [----Set X = (X - 100)] Up: Change the trigger to this: ----Set X = (X of (position of MARINE 001)) ----Set EndDest = (Position of MARINE 001) ----Set Y = (Y of (EndDest)) ----Set Y = (Y + 100) ----Set EndDest = (Point (X, Y) ----Unit – Order MARINE 001 to face EndDest ----Unit – Order MARINE 001 to move to EndDest ----Item – Remove (Item being manipulated) Down: Change [----Set Y = (Y + 100)] in the up trigger to [----Set Y = (Y - 100)] To make this trigger make for multiple players (1 marine for each player), change the marine to a unit variable array, change Y, X, and EndDest to arrays. That concludes the unit movement with buttons trigger. |
| 11-16-2002, 02:00 PM | #2 |
Ooops. Below is the map file which has the trigger already made in it. Just copy and paste. |
| 11-16-2002, 03:55 PM | #3 |
Good tutorial :D . I like all the colour coding and stuff. Ther are alot of these tutorials out ther like this and if anyone needs help visit the FPS Project Forum and go to the How To Make An FPS thread. |
| 11-16-2002, 04:07 PM | #4 |
I think I Should mention that Item is no longer the "Smart" way to do it. Lets take a look at MR.123 MarioKart3 or Lag CART 3 he uses remove item and it lags to hell becuase of it. We should switch as when you remove an item it remains memory resident as for some reason WAR3 catologs every item purchased and aquired by a hero. Moving to hired units is alot better as hired units can be exploded instead of removed and exploded units leave no corpse and leave less residue in memory I have checked and it does cuase a great deal less lag. |
| 11-16-2002, 04:19 PM | #5 |
Thanks weaaddar. That seems much better. I'll pass that on, :D |
| 11-17-2002, 02:10 AM | #6 |
[glow=strength=6,color=skyblue]THE AMMO SYSTEM[/glow] This is a trigger on how to do the ammo system. RELOAD TRIGGER Event: ----A unit owned by (Enemy player) is attacked Condition: ----Owner of triggering unit equal to (Player 1) Action: ----Add -1 to player 1 current lumber ----If player 1 current lumber equal to 0, then do (add -1 to player 1 current gold), else do nothing. ----If player 1 current lumber equal to 0, then do (add 1 to player 10 to player 1 current lumber), else do nothing. ----If Player 1 current lumber equal to 0 and player 1 current gold equal to 0, then do (run trigger NO AMMO <gen>), else do nothing. Gold is clips remaining, lumber is ammo remaining. 10 rounds per clip. The NO AMMO trigger Action: ----Replace random unit of owned by Player 1 of type MARINE with OUT OF AMMO using the replaced unit's relative life. ----Turn off trigger RELOAD ----Set variable WEAPON = False Acquire ROUNDS trigger: Event: A unit enters region AMMO <gen> Condition: (owner of (triggering unit)) equal to Player 1 Action: Add 5 to player 1 current gold GET NEW ROUNDS TRIGGER Event: ----Every 2 seconds of the game Condition: ----Player 1 current gold not equal to 0 ----Weapon = False Action: ----Add -1 to player 1 current gold ----Add 10 to player 1 current lumber ----Replace random unit owned by player 1 of type OUT OF AMMO with MARINE using the replaced units relative life ----Set variable WEAPON = true Marine and OUT OF AMMO are units. WEAPON is a variable of type boolean. That should work. :D Happy usage! |
| 11-17-2002, 02:23 AM | #7 | |
Quote:
(idea from a map called Firestorm X) u can actaully make the marine sell items... |
| 11-17-2002, 05:19 PM | #8 |
kool, i didn't know that. I think i will be making more tutorials soon. |
| 11-17-2002, 05:46 PM | #9 |
I think the item thing is real cool... :D |
| 11-17-2002, 09:35 PM | #10 |
Thanks. |
| 11-17-2002, 09:41 PM | #11 |
SuperIKI made a way to move stuff with the arrow keys |
| 11-17-2002, 09:44 PM | #12 |
sweet, where can i see that? |
| 11-17-2002, 11:48 PM | #13 |
I don't know where SuperIKI's thread is but I know what moving with arrows is about. Since there is no key codes for the arrow keys you make triggers that check the camera view area. When you press arrow keys your screen scrolls. There are triggers that can detect this movement and do an action with it. I do not remember the triggers emote_confused because I havent been that active in map editing lately but I might find them later. Hope this helps :). |
