• 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.

Please help with a couple questions

Status
Not open for further replies.
Level 4
Joined
Oct 12, 2004
Messages
59
- Say i want to create an item with 4 items of metal, and you buy an item call create armor, how do you make itremove the 4 metal items only if they have 4 and create the armor?

- Also if you own a unit and it casts the ability rent out, how do you make it remove the ability rent out and remove inventory(6)-(6 slots of inventory)) and add ability evict family to either large blue house and large green house and then wait 480 seconds then add ability inventory 1 then create item collect rent and give it to casting unit and make it use "collect rent" then adding 50 gold to the owner of casting units gold. then wait 480 seconds and tell the unit to use item again adding another 50 gold but the item has a cooldown of 480 seconds to insure not using it over and over again.

EVENT-a unit begins casting an ability
CONDITION-(Ability being cast) equal to rent out
-(Unit-type of (casting unit) equal to Large Gree House
-(Unit-type of (casting unit) equal to Large Blue House
ACTIONS-Unit-Remove "Rent Out" from (casting unit)
-Unit-Add "evict family" to (Casting Unit)
-Wait (5 Seconds)
-Unit-Remove (inventory 6) from casting unit
-Add (Inventory 1) to casting unit
-Create item collect rent for casting unit
-order casting unit to use "Collect Rent"
-Add 50 to (owner of)hero manipulating item) current gold

It doesnt remove "inventory 6" and it doesnt remove "rent out" from the unit.

I did it this way so i dont have to go through and make each individual unit get 50 gold and remove each ability individually.
Also the item doesnt get created in the units inventory it get created at another building i have in the center of the map.

Plz help this is very important to me.
thanks

P.S. Is there a way to change ownership of a neutral passive unit to the owner of the player that selects it with a mouse as long as they have say "Key to large House" in inventory, which makes it so if a player selects any large house met by the conditions CONDITIONS-(unit-type of ?selected unit equal to(large Green House))
-(unit-type of ?selected unit? equal to (Large Blue House)
ACTIONS-change ownership of ?slected unit? to owner of selecting player?

There is no selecting or selected unit triggers. Id like to have this happen, Plz help Thx.
 
Level 5
Joined
Mar 12, 2005
Messages
117
ok question one

Event: unit acuires an item

Condition: all conditions equal true

item carried by hero of type (metal)
in slot slot 1,2,3,4

item carried by hero of type (create armour)

action: remove items from hero(triggering unit) in all 5 slots.
create item (ARMOUR) at position of Hero Manipulating Item
give last created item to Hero Manipulating Item.

That should work.

your second trigger is pretty confusing and complecated. to use a rent paying system create a variable call tenants set it as and integer. the if abilty family move is used on house
set variable, set tenants=tenants+1
the every 60 secs give gold (arithmatic - tenants x 50) to player x. obviously you need to amke tenants varibel for every player.
then make if ability evict family is unsed set variable tenants to tenants=tenants-1

3rd

Evenut (generic)unit uses ability get in to house

condition: item carried by hero of type key

action change ownership

i think that should answer your questions if i haven'y then you need to right it out a little less confusing. hope i helped
 
Status
Not open for further replies.
Top