Staredit Network

Staredit Network -> UMS Assistance -> virtual Health with gaz + ammo systeme
Report, edit, etc...Posted by Thyrax on 2006-05-08 at 22:18:16
ok , this time ill try to be very clear , here is what i want to do!

i am trying to make a doom map.
there is 4 trooper killing monster.

Each player can switch weapon ( unit ) so a virtual health systme is required to keep the same % of life when the player is using an other unit.
Each weapon have is own independent system

I want mineral to be ammo and gaz to be health in %
Each weapon will have different Unit representing The number of Clip And Ammo they have so when i switch to an other weapon , and come back to this one after , it keep the same number of ammo.

Using a burrowed zergling following ghost make it hard to check how much life the unit have hehe , this is why i want to use gaz.

Hope its clear , and sry again for the similar question ( that one should be the last lol biggrin.gif ) I any of you have any suggestion of some cool thing to put in the map , that would be cool too !

Report, edit, etc...Posted by Kupo on 2006-05-08 at 22:33:58
uhh sounds very cool"z". Why not just have zerglings under them, once its killed remake one, and set score, have a leaderboard.
Report, edit, etc...Posted by Thyrax on 2006-05-08 at 22:38:41
but killing a zergling every zecond under the ghost maybe be very anoying lol
Report, edit, etc...Posted by The_Shattered_moose on 2006-05-08 at 23:04:46
Ok, you have several options for the keeping ammo amount stored. The best one would be to use death counts to actually record the ammunition in each weapon, you could even have a clip system with this, which you would code like:
Conditions:
Player has suffered 0 deaths of "shotgun ammo"
Player has suffered at least 1 deaths of "shotgun clips"
Switch "no reload" is cleared
Whatever else you want (reload button pushed, weapon is out, etc...
Actions:
Subtract 1 deaths of "shotgun clips" for player, add 6 deaths of "shotgun ammo" for player.
Then, in order to represent the ammo amount as minerals, have a trigger like this:
Conditions: (This trigger sets up the death count to mineral transfer)
Weapon is out (whatever conditions you choose to use for a weapon being selected)
Switch/Binary deathcount is clear
Any other things you might want
Actions: add 1 deaths of "process stage" for player

Now, for the actual translation from deathcounts to gas:
Conditions: Player has suffered exactly 1 deaths of process stage
player has suffered at least 1 deaths of "shotgun ammo"
Actions: Subtract 1 deaths of "shotgun ammo" for player
Add 1 deaths of "ammo buffer" for player
Add 1 deaths of "ammo buffer 2" for player
Set switch "no reload"
Preserve trigger

Conditions: Player has suffered exactly 1 deaths of process stage
Player has suffered exactly 0 deaths of "shotgun ammo"
Actions: Set deaths of "process stage" to 2
Preserve trigger

Conditions: Player has suffered exactly 2 deaths of "process stage"
Player has suffered at least 1 deaths of "ammo buffer"
Actions:
Subtract 1 deaths of "ammo buffer" for current player
Add 1 deaths of "shotgun ammo" for current player
Preserve trigger

Conditinos: Player has suffered exactly 2 deaths of "process stage"
Player has suffered exactly 0 deaths of "ammo buffer"
Actions:
Set deaths of "process stage" to 3
Preserve trigger

Conditions: Player has suffered exactly 3 deaths of "process stage"
Player has suffered at least 1 deaths of "ammo buffer 2"
Actions:
Subtract 1 deaths of "ammo buffer 2" for player
Add 1 minerals for player
Preserve trigger

Conditions: Player has suffered exactly 3 deaths of "process stage"
Player has suffered exactly 0 deaths of "ammo buffer 2"
Actions:
Set deaths of "ammo buffer" to 0
Set deaths of "ammo buffer 2" to 0
Set deaths of "process stage" to 0
Clear switch "no reload"
Preserve trigger

Whew, that system should do the trick, although its probably very hard to follow.
To further streamline this process, you could transfer weapon specific ammo to a general ammo death count before firing all these triggers, so that you wouldn't need to recopy these out for each weapon, all you would need would be a weapon ammo deathcount to general ammo deathcount transfer, then to replace "shotgun ammo" in any given area with "general ammo".
Its getting late here-- if you don't understand this system/want to see it in action, I can explain tomorrow, and even create large portions of the actual triggers if I have the energy.
Addition: For your problem of life left/life percent, life percent will be a major pain to pull off, but if you just want lives left, you can use a system like this:
Conditions:
Switch "no recheck" is cleared
Player has suffered 0 deaths of virtual hp unit
Player brings at least 1 virtual hp unit to "unit location" (Thats where your ghost/marine/other unit is)
Actions: Give 1 virtual hp unit at "unit location" to unused player
Add 1 vespense gas for player
preserve trigger

Conditions: Player brings exactly 0 virtual hp unit to "unit location"
Player has suffered 0 deaths of virtual hp unit
Actions: Give all virtual hp unit at "unit location" owned by unused player to player.
Set switch "no recheck"
Preserve trigger

Conditions:
Switch no recheck is set
Player has suffered at least 1 deaths of virtual hp unit
Actions: Clear switch "no recheck"
set deaths of virtual hp unit to 0 for player
Preserve trigger

Finally done. If you need a step by step explanation of what happens in each trigger, I can provide it to you tomorrow.
Report, edit, etc...Posted by Thyrax on 2006-05-08 at 23:19:53
first of all , thx man wink.gif

But yeah , its late for me too hehe , i think ill read your post again tomorow.
If you can help me step by step , at least for the begening , it would be very cool too hehe.

And for the health systeme , there is only one life.
The Trooper is invincable , comp shoot the zergling under the player and when it die , its the end of the game.

What i wanted to do is to find a way to Detect how many health the zergling have or any other thing that would make it posible to translate this into gaz because its kinda Hard to check how many health a burrowed zergling , under your unit , beeing owned by a comp , witch make it invisible lol crazy.gif

If this is impossible ( i mean , Realy impossible angry.gif ) i Accept suggestion of a similar health system , basicly , a way to see how many health the zergling have.

EDIT: an other solution would be to put a unit That doesnt make any sound and anymation when it die ( witch i think doesnt exist , but correct me if im wrong ) with like 10hp under the trooper so when it get killed i remove exemple 1 gaz and then imediatly recreating one

That system would be the best i think but as i said before , having a zergling exploding at your feet every second is very anoying lol.
Report, edit, etc...Posted by The_Shattered_moose on 2006-05-09 at 17:46:28
Actually, having a zergling die below the player gives a nice blood effect, as long as you make it so that a zergling is a fairly large amount of damage to take, it will just look like the player is bleeding from being shot at.
As for detecting the zergling's life, its only possible if you use EUD triggers, and then you would have to make it so the zergling never died, as if it died the memory value for it would no longer apply.
Report, edit, etc...Posted by Thyrax on 2006-05-09 at 19:32:07
i tried to set up the life trigger , but zergling wont create burrowed and doesnt realy follow the ghost , but does respawn beside it when it die.... look at my trigger.

( these are for player 6 , wich is the owner of the burrowed zergling i use to count life )

CONDITIONS
Always

ACTIONS
Center location labeled 'hp1' on 'zergling' owned by player 6 at 'hp1'
------------------------------------------------------------------------------
CONDITIONS
always

ACTIONS
Create one 'zergling' at 'hp1' for player 6. Apply properties ( burrowed )
-----------------------------------------------------------------------------------
CONDITIONS
always

ACTIONS
move all 'zergling' for player 6 at 'hp1' to 'player1' ( that location follow the player )
Wait 75 milliseconds ( so it give time for comp to be able to shot him )
preserve trigger
---------------------------------------------------------------------------------------

Ok and there is a few other trigger but they only say to subtract 1 gaz at every zergling death , and it seems to work , so when these trigger are gonna work perfectly , this health systeme should be very nice !
Report, edit, etc...Posted by Zeratul_101 on 2006-05-09 at 19:42:32
QUOTE(Thyrax @ May 9 2006, 05:31 PM)
i tried to set up the life trigger , but zergling wont create burrowed and doesnt realy follow the ghost , but does respawn beside it when it die.... look at my trigger.

( these are for player 6 , wich is the owner of the burrowed zergling i use to count life )

CONDITIONS
Always

ACTIONS
Center location labeled 'hp1' on 'zergling' owned by player 6 at 'hp1'
------------------------------------------------------------------------------
CONDITIONS
always

ACTIONS
Create one 'zergling' at 'hp1' for player 6. Apply properties ( burrowed )
-----------------------------------------------------------------------------------
CONDITIONS
always

ACTIONS
move all 'zergling' for player 6 at 'hp1' to 'player1' ( that location follow the player )
Wait 75 milliseconds ( so it give time for comp to be able to shot him )
preserve trigger
---------------------------------------------------------------------------------------
[right][snapback]483209[/snapback][/right]


theres no preserve trigger on the centering trigger and you don't need the wait action.
Report, edit, etc...Posted by Thyrax on 2006-05-09 at 21:52:12
Im sry , i forgot to write it lol , actualy , there is a preserve trigger , and i do need the wait action , whitout it , the zergling move too fast and comp cannot hit it.
Report, edit, etc...Posted by Zeratul_101 on 2006-05-09 at 23:01:54
do you have hypers?

if you don't, the trigger is firing as fast as it can(once per 2 seconds) and i doubt your wait is helping. this 'lag' is just the trigger nor firing(and moving) fast
enough.

if you do have hypers. i'm guessing the reason your zergling "doesnt realy follow the ghost " is because of wait blocks.



i don't see how the comp is having trouble firing. i've used virtual hp against comps before and it has always worked fine. Chances are that the enemy is moving and has to stop before it fires(this is normal). Otherwise(i think), you'll start taking damage from enemies hitting a patch of dirt three squares away(not very good at all).
Report, edit, etc...Posted by Thyrax on 2006-05-09 at 23:26:46
I do have Hyper trigger , but the main problem is that the zergling is not burrowed ... even if i create and recreate it burrowed
Report, edit, etc...Posted by Lethal_Illusion on 2006-05-12 at 16:43:31
Why isn't it burrowing? Does it keep unburrowing or something?

ADDITION:
If it's unburrowing, then it might be because it needs to be allied with the attacker.
If it's unallied with the attacker, then it will retaliate and hence the unburrowing.
Report, edit, etc...Posted by Zeratul_101 on 2006-05-13 at 15:31:39
if its unburrowing after it gets attacked, its because burrowed units automatically unburrow when attacked. switch the unit with its hero form and it should work fine
Next Page (1)