Staredit Network

Staredit Network -> Concepts -> Realistic Ammo System
Report, edit, etc...Posted by fishgold on 2005-10-22 at 22:42:07
QUOTE(fishgold)
Assuming that you know how to detect unit's movement. It is quite easy to detect whether unit is attacking or not. Refresh the conditions which unit needs to be able to attack. Except air units and some particular units with turrets, almost every unit in starcraft can not attack while it's moving. At least they can't move immediatly after they attack. So the idea is to apply movement detector with ammo system.

But, first of all, you need to know the attack range of each unit that you will apply this ammo system to. Once you know the attack range, second job is to use 2 or 3 locations to represent that attack range.

For example, if goliath's attack range is 6, then you could make 2 locations with size 12x8 and 8x12.

(note: Just multiply 2/3 to get the other length of side.)

Now all you need to do is, configuration of weapons. Please read the ReadMe comment inside of map for more information.



Pitfalls on this ammo system

- If player press stop button continously, then ammo will decrease whtout shooting.

- If player unit is trapped in somewhere and tries to move to somewhere else. For example, surrounded by melee units such as zerglings, then same thing will happen as above.

- If there is a unit on higher layer of terrain and player can't see it, then ammo will decrease without attacking.


Download Link
http://www.staredit.net/index.php?download=4366
Report, edit, etc...Posted by Rantent on 2005-10-23 at 05:05:21
So this is just decreasing the ammo when the unit should be attacking.
It doesn't work when you move the unit to a spot then move it again before it gets a chance to attack. This would work better for a big generalizing of units, rather than for use on a single hero. Just my opinion.
Report, edit, etc...Posted by SuperToast on 2005-10-23 at 11:47:02
Add EUD health detection and it could be useful, but only if the units being attacked keep the same unit id's. The main problem is firing from different heights without vision.
Report, edit, etc...Posted by fishgold on 2005-10-24 at 01:28:11
QUOTE(SuperToast @ Oct 24 2005, 03:47 AM)
The main problem is firing from different heights without vision.
[right][snapback]339592[/snapback][/right]

Good point. Yes, I think I should create a map revealer every time player moves so that player can see everything near him. But I think this is not the best solution... pinch.gif
Report, edit, etc...Posted by Urmom(U) on 2005-10-27 at 16:20:27
it is a cool way that you did it but I glitched it too easily. I made it so that i could attack with the firebat when I had no ammo, I made it so that my ghost was loosing ammo when I wasn't shooting, and I made it so that the next weapon wouldnt work. its a great idea, but it's too easy to glitch.
Report, edit, etc...Posted by RedNara on 2005-10-27 at 18:46:31
i like this one but everyone already said what will happen if it might go wrong

on all my zombie game.. i like all zombie 1 hit die.. tongue.gif becuase i like it that way

ADDITION:
expect for bosses
Report, edit, etc...Posted by Dr.Shotgun on 2005-10-27 at 19:06:05
I've thought about this before, but I decided it wouldnt work.

A real way to do it would be to create VHP for all monsters or enemies within your perimeter. Everytime an enemy's VHP drone is killed, you lose an ammo point.
Report, edit, etc...Posted by Oo.Insane.oO on 2005-10-27 at 21:12:20
That is a pretty good idea Dr just have locations for all units to follow but that might be a little glitchy 2.
Report, edit, etc...Posted by Sniper on 2005-10-28 at 01:33:52
Not glitchy, pretty much impossible.
If you have many of the same unit the locations will all follow the one unit on the bottom left corner.
Report, edit, etc...Posted by Oo.Insane.oO on 2005-10-28 at 12:31:54
Really? why couldnt you just trigger it to follow a unit that starts off in a certain location or is that impossable too?
Report, edit, etc...Posted by RedNara on 2005-10-28 at 14:10:25
can you just have your guy have a location or am i not getting this..
Report, edit, etc...Posted by Dr.Shotgun on 2005-10-28 at 18:11:45
Creating spontaneuos VHP is pretty much impossible, I've never tried to do it though, just thought about it...
Report, edit, etc...Posted by AFL-InuYasha on 2005-10-28 at 22:11:19
it would b wicked hard, but having the vurtual hp system for each enemy and every time one of the burrowed units is killed and a human has the kill score, it subtracts 1 ammo, this way its not 1 ammo per kill
Report, edit, etc...Posted by r[s]t on 2005-11-14 at 01:21:22
solution to standing still bug.

Make a location, big enough for the untis firing range. Have it only run when an enemy is present

Report, edit, etc...Posted by Do-0dan on 2005-11-14 at 01:33:22
i thought about this ammo system a long time ago and decided that it wouldnt be good

the best way i could think of is using VHP where enemy gets damaged slightly (health becomes 99%) and create one "lost life" counter for that enemy and decrease ammo, then heal the enemy and repeat
when the enemy gets enough counters, it dies

problem with this is detecting how the unit got 99% hp
Report, edit, etc...Posted by PCFredZ on 2005-11-14 at 17:24:32
A 100% deadly accurate bullet system uses EUD deaths to detect health lost. Can't find it in DLDB though, must have been in a post...
Report, edit, etc...Posted by AFL-InuYasha on 2005-11-14 at 20:47:11
EUD/s only detect percents though, if one shot brought dwn by less then 1 or more then 1 it would bug, so its not 100%, unless EUDs can detect when a certain unit actually attacked, then u could just subtract 1 ammo
Report, edit, etc...Posted by WoodenFire on 2005-11-15 at 17:25:15
You technically can setup a mass VHP system for all units on a map, or near your hero even if they are the same type of unit by setting up a search-engine to cycle through each unit pulling together a # of counters under the target. You can set this up by doing the following...

First of all, the first problem with moving a location and moving units under it is that it might borrow a unit under it from a different unit, the correct way to solve this is have 9 different burrowed units so that in a 2-block wide/long location, the center unit, and the surrounding area is checked for the lag-behind from movment.

When creating the units, disable the "Life Checker," add the max life to that peticular individual using a checking system for other burrowed units at all times. If a unit detects while it is moving around the terrain, a distant (large location on that targetted unit) spawned unit with the same burrowed units, it will centerlocation, activate a Re-Designation switch to check others around it to make sure it can be altered, and redesignated as a different burrowed unit counter. When finished, the system will continue to check all of the units.

This works with Zone-Control of wondering units, nearest units have VHP, but if you do Zone-Controled units within your battling area, they would reheal each time you entered combat unless each wondering unit freezes or runs off (out of sight) automatically after you try killing it, or it kills you.

A mass system using this would be very glitchy seeing that when a clump of 12 units builds up in 2+ areas, the trigger reidentification program would fail consistantly and you might have units borrowing HP counters...

There are two systems to add to provent this from ever happening.

The first would be to have an AI program that would seperate similar units from bunching up by using a mobile grid to move all of them away from eachother. The parent of this system would be to have hydras deally eachother, switching one group of burrowed units to an ally of the heroes, thus they battle eachother, and Kill Checker would kill them when their burrowed units are dead.

The second system would be to have a max share volume. Lets say, two hydras in an area have 4 and 8 counters. The one with 4 is being checked, and there are several Hydras around it, the one of the farthest left has 8. The health of a healthy hydra has 8 life, and the system recognizes that it must re-ajust for the movment of the first hydra, thus it borrows 4 more, and leaves the other hydra with just 4 HP counters. Don't see how this would help? Well, its a good way to just have similar units share/exchange HP evenly... not taking too much, not taking too little. If the hydra that is right next to it has a single burrowed unit, it would borrow 1 from that hydra, and that hydra would be killed when the Kill Checker came around to see it.

A second Kill Checker can be created to check all units in your heroes vision range, thus killing them before they can attack you. If this happens, you can remove/kill the unit and disable it after it checks all the units, and then allows the normal Kill checker to do the Death effect for blood, etc...

Thats one of the systems I thought of to fix this mass unit VHP system with similar units. Please don't post any comments about this post unless you have read this entire post and understand everything I am saying in this, including all systems.

Hope this brings up more ideas. biggrin.gif
Report, edit, etc...Posted by PCFredZ on 2005-11-15 at 17:32:24
WoodenFire, I think they're doing detecting shots without need of VHP.
Report, edit, etc...Posted by Mystic-Death on 2005-11-15 at 20:02:18
QUOTE
solution to standing still bug.

Make a location, big enough for the untis firing range. Have it only run when an enemy is present


Faulty. If you are stuck in the corner of a cliff with some friendly CPU units cornering you, and there is an unseen unit that does not have a ranged attack, it would subtract the ammo...
-Can't kill enemy, cuase it does not attack you and give you temporary vision.
-Can't kill allies, becuase of constant ally trigger.
-Can't move from the corner!
Report, edit, etc...Posted by WoodenFire on 2005-11-15 at 22:26:21
Mystic, you just repeated everything that was alreayd stated. Pointless post...

Be more observant!

And yo, PCFred, there system was faulty, was it not? biggrin.gif
Report, edit, etc...Posted by AFL-InuYasha on 2005-11-16 at 21:00:33
i still think using EUD's to detect when a nuit attakcs is probably your best bet
Report, edit, etc...Posted by PCFredZ on 2005-11-17 at 12:28:37
QUOTE(WoodenFire @ Nov 15 2005, 10:26 PM)
And yo, PCFred, there system was faulty, was it not? biggrin.gif
[right][snapback]357021[/snapback][/right]

Yeah, as I brought up previously, I've seen a better system using EUD deaths do detect health lost.
Report, edit, etc...Posted by AFL-InuYasha on 2005-11-19 at 17:54:29
well EU D's can acomplish almost anythinbg now, even just the conditions
Next Page (1)