Need help with ammo trigger

J

Jagman

Guest
OK I'm trying to create a map which will need to involve a ground unit like a marine or ghost or firebat etc. to have ammo. Ive seen it done on a resident evil map but i can't seem to find that map again. I need help on how to make it so every time a unit attacks they have ammo. I know itr has to do with the leader board or custom score or something like that. Please help, im desperate.

Thanx,
Jagman
 

Ilendil

Most Respected Former Admin
Reaction score
1
I believe its based on for every kill you do, your minerals or gas or whatever is used to count your ammo is deducted.

CONDITION
- Player 1 kills at least 1 Zombie owned by Player 2
ACTION
- Set deaths of Zombie by Player 2 to 0
- Set 'deduct ammo'
- Preserve Trigger

CONDITION
- 'Deduct ammo' is set.
ACTION
- Clear 'deduct ammo'
- Deduct # minerals from Player 1
- Preserve Trigger
 
J

Jagman

Guest
Thanks a million your a life saver. I'll try it out and see how it works. thanks again.
 
J

Jagman

Guest
Hmm well it seems to work but theres one problem with the way i set up the minerals. When a player gets a marine the marine gets 300 ammo (minerals):

CONDITIONS:
Current player commands at least 1 marine

ACTIONS:
Set "get ammo"
Preserve trigger

now when i get a marine i he gets 300 minerals/ ammo:

CONDITIONS:
"get ammo" is set

ACTIONS:
Clear "get ammo"
Modify resources for current player:set to 300
Preserve trigger

this all works but when you kill another marine its suppost to minus 2 shots. It does but it instantly goes back up to 300. I'm afraid if i put "Modify resources for current player: add to 300" the trigger will just keep adding 300 minerals to the marine. how do i stop the minerals from reseting to 300 (be aware that you have the option of switching between units in teh game so i want to keep the trigger that gives the marine 300 minerals every time he is created) please help im desperate again.
 

Ilendil

Most Respected Former Admin
Reaction score
1
I believe in the Resident Evil game, it created some form of unit, such as a crystal, that counts what unit you have.
You can create a crystal symbolizing the marine.

CONDITION
- Current player brings exactly one Civilian to 'location that makes the marine'
ACTION
- Remove exactly 1 Civilian from 'location that makes the marine'
- Create one Marine at 'Spawn'
- Create one Marine Crystal at 'Crystals'
- Preserve Trigger

CONDITION
- Current player commands at least one Marine Crystal
ACTION
- Remove exactly 1 Marine Crystal from 'Crystals'
- Set resources of current player: Set to 300 minerals
- Preserve Trigger
 
J

Jagman

Guest
Thanks a million but i don't get what your explaining here. You wouldn't happen to have that map i was talking about whould you? If not excakaly what do ya mean by the whole crystal thing.
 
J

Jagman

Guest
I get what ya mean now, but wouldnt that make marines and crystals keep appering until you get the stupid error message.
 

Ilendil

Most Respected Former Admin
Reaction score
1
No, the marine and crystal get created once you bring a unit such as a Civilian to a beacon that creates it.
Once its created, the civilian is gone, so you can't keep creating them over and over.
Unless your map is created differently, this is how it should work.

And yes, I have and played a map that is similar to this.
 
Z

Zakreon

Guest
Jagman said:
Hmm well it seems to work but theres one problem with the way i set up the minerals. When a player gets a marine the marine gets 300 ammo (minerals):

CONDITIONS:
Current player commands at least 1 marine

ACTIONS:
Set "get ammo"
Preserve trigger

now when i get a marine i he gets 300 minerals/ ammo:

CONDITIONS:
"get ammo" is set

ACTIONS:
Clear "get ammo"
Modify resources for current player:set to 300
Preserve trigger

this all works but when you kill another marine its suppost to minus 2 shots. It does but it instantly goes back up to 300. I'm afraid if i put "Modify resources for current player: add to 300" the trigger will just keep adding 300 minerals to the marine. how do i stop the minerals from reseting to 300 (be aware that you have the option of switching between units in teh game so i want to keep the trigger that gives the marine 300 minerals every time he is created) please help im desperate again.

your problem is with your 1st trigger,

CONDITIONS:
Current player commands at least 1 marine

ACTIONS:
Set "get ammo"
Preserve trigger

preserve trigger repeats the trigger, since you will control the 1 marine a long time probably, every instant you command 1 marine your minerals will set to 300, and you are right, if you set it to add then your minerals will keep going up and up forever! (untill you reach max).

to counter this, do not preserve trigger, after you make this one make another witch may be like

CONDITIONS:
Current player commands at least 1 marine

ACTIONS:
Set "get ammo"

Next trigger-

CONDITIONS:
Switch "get ammo" is cleared
Player 1 brings 1 marine to location "ammo box 1"
Player 3 brings 1 ammo box to location "ammo box 1"

ACTIONS:
Set "get ammo"
remove all units (or specific box) for player 3 at location "ammo box 1"
Preserve trigger

Next trigger-

CONDITIONS:
"get ammo" is set

ACTIONS:
Clear "get ammo"
Modify resources for current player:set to 300
Preserve trigger


and BAM! ammo trigger reset ammunition trigger! (thats a mouthful isnt it?)

also while im here i got my own ammo trigger that i dont thinkc an be helped.
i have a ghost that has only 1 ammo and has a super powerful sniper rifle, every shot then he has to reload, (also i have a wav that will play when he uses that ammo if ya know what i mean) but there are buildings he will have to attack and if he attacks he wont run out of ammo untill the enemy is dead, then when the enemy is dead the wave will play and the ammo will go down, there isnt a way to fix this is there?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top