• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AMO SYTEM

was this helpful or intersesting?

  • yes it was

    Votes: 0 0.0%
  • this sucked

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.
Level 2
Joined
Nov 18, 2005
Messages
12
this is strictly for frozen throne...

an amo sytem in one of the things most new map makers try to make but are not very good at for obvious resons. so i thought i would help. to make and amo sytem you could simply make a charged item but it would seem dull in order to make something like in dawn of the dead here is what u need to do... you will have to sacrafice ether food gold or lumber but it is well worth it. first make a unit that you want to have the amo sytem with (example: in dawn of the dead this would be you only guy) just for this we will call him BOB then go to the trigger editer. first make a trigger call it what you want butt for now ill call it amo 1.


amo 1


event: unit-unit specific event - unit begins casting ability.

actoin: player -set property- player - set - owner of unit BOB)current gold to (sign(((player 1 (red) current gold) -1) -0))




sorry if i want clear on how to do this part it has something to do with math sign. it might take time to figure it out and the casting ability is unit event here is the next trigger triger amo 2 we will call it

event: player- player 1 (red)'s current gold becomes less than or equal to 0.00

action: unit- remove ability shoot from (BOB)

shoot i will show you later put a diff spell in its palce

now the last triger makes the amo set for your playr... how much he starts at. if you wanted since we have gold for amo you could usr lumber for curisy. then you could have them by the item that alows you go over it like a tome and then you get gold. you know what in talking about?
however if you want him to start out with amo do this triger

event: map intalazation (something like that)

action: player-set player property- set player (owner of unit BOB) curent gold to (your set amount)

now go to the object editer. go to abilitys. now make a new one and bace it of of the mages fire balll thing (you know what i mean) name it shoot now set the amount of damage to what want (you know the works) ok now change the icon from a flaming ....... thing.... to this

ReplaceableTextures\PassiveButtons\PASBTNFlakCannons.blp

give this ability to your hero.

well this is all you have to do but there is still more u can do.


now go to advanced and go to game interface....
look through the icons till you find one that says GOLD click on it. set it to custom script and copy this in

ReplaceableTextures\PassiveButtons\PASBTNFlakCannons.blp


now up at the top of your screan were your resorces used to be the thing that was gold is now amunition. is you want find the one that says lumber and find one that looks good for curincy. now go down to were it says
text-mesage- find the one that says not enogh gold dubl click it and tipe in out of amo. for lumber you would put not enogh money

now you have to go back up to sounds. no food and no gold.
edit these so that they do not say. NOT ENOUGH GOLD in an eritateing voice now they can do what ever you want you could even import your voice frankly i dont care.



well thats it hope it works great for you - banana2000
 
Level 6
Joined
Sep 17, 2005
Messages
276
yes thats i good solution for removing the attack when no ammo and should work good.

what i have use in my map was not with an ability.
i just had one trigger for decrease ammo:

EVENT: a unit is attacked
COND: owner of attacking unit is controlled by user
ACTION: player property-add -1 gold for owner of attacking unit


2nd for when no ammo left:

EVENT: player 1 gold becomes less than or equal to 0
COND:
ACTION: set alliance between (triggering player) and <<your enemy>> to neutral sharing vision off

here the player can still attack when he presses attack and click on enemy unit, but thats ok for my map, b/c there are many enemies and this would be the death when your unit cant shoot automatically no more.

and the third trigger sets unally again when he gets ammo again.

i just wanted to add this - this is a second solution special for survival maps. it is a bit simplier cz you dont need an ability just 3 triggers :wink:
 
Level 2
Joined
Nov 18, 2005
Messages
12
awsome

thats a realy cool idea just make shure they have the ability to not fire when they dont wana run out of amno. also u could set it so that u have the abilty to ato cast. that would eleminate the problem of them knowing were u are in the map and it would also solve ur problem of you not fireing fast enough.


i havent looked at it yet so i dont know if these trigers would work but you could also set it up so that when unit begins spell unally (emamy player) when attacked unit dies ally (enemy player) without shared vision. that would solve both problems and also keep the idia that yo have to click on the unit but it wont only give one burst like what ur talking about. heres an idiea also... make an ability puch and have it with out the ammo system. then when unit aquires item give unit ranged attack like an orb would. so you pick up wepons give the wepon the gold ability like in the capain when u touch the gold thing
u get gold. give the gun this ability so you pick up ammo when u pick up the gun.

MAGAZEENS!!!!!!


to make it realy realistick make lumber magazeens.


the idiea is when player gold less than or equal to 0 gold subtract 1 lumber and add well however much u want gold. with the condition that player hass any lumber........ well if not he will die and become apart of the mutilated...... how sad..... ok im bored im geten off
 
Level 6
Joined
Sep 17, 2005
Messages
276
Re: awsome

banana2000 said:
i havent looked at it yet so i dont know if these trigers would work...

sure they work i use them already in my map.

to the point with lumber=magazines:
sure that would be more realistic but i decided to use the lumber otherwise :wink:
 
Level 9
Joined
Nov 27, 2004
Messages
465
I'm making it as a "unit pause"

Today i tested my new ammo system ,where player have a choice to "reload" automaticly or to press a 'Reload" button at "Actions" ability.

At both situations unit will be paused AND special animation will going on !

i may give link for a map,but i will protect it,because this is the beginning of a future series of .... {secret}
 
Level 3
Joined
Oct 20, 2005
Messages
31
Code:
function Trig_Reloading_Conditions takes nothing returns boolean
    return ( (udg_Reloading[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] != 0) and (IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true) )
endfunction

function Trig_Reloading_Actions takes nothing returns nothing
    call IssueImmediateOrder(GetAttacker(),"stop")
endfunction

//===========================================================================
function InitTrig_Reloading takes nothing returns nothing
    set gg_trg_Reloading = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_Reloading, Condition( function Trig_Reloading_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading, function Trig_Reloading_Actions )
endfunction

This is the Reloading trigger used in NotD Aftermath. The other parts of the ammunition system are also rather straightforward. The reason why I am using this is because we do not want players to attack at all, while still be able to manipulate their marine during Reload. The reason for IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true is that players may also control NPC Marines during the course of the game. Hmm perhaps using unit custom value would be a more efficient condition.
 
Level 9
Joined
Nov 27, 2004
Messages
465
i wanna see that guy,who will reload his AK-47 or M-16 while running out from the hordes of monsters :lol:


P.S.
Dunno,my heroes always have unit variables,so im not thinking for using custom value at "simple triggers" ...
 
Status
Not open for further replies.
Top