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.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      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