(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > Requests

Requests Need a resource done for your project? Post your request here, however we cannot guarantee that your request may be answered.

Reply
 
LinkBack Thread Tools Display Modes
Old 11-18-2008, 04:07 PM   #1 (permalink)

User
 
Join Date: Sep 2008
Posts: 4

Darth Eye is an unknown quantity at this point (0)


Some Triggerquestions

Hello,
i am already working on a special Map but now i have some Problems with some Trigger.

1. If a Unit pick up a certain Item, this Unit should get a certain Spell. And also should lose this Spell if this Unit drop the Item.

1.2 If no exemplar of this certain Item is in the Inventory of the Unit a certain Type of a Unit should be erased.

2. If the Player activate a certain Spell the Unit should not be able to attack. Like a standbymode. And the Player should get for each Unit in this "standby"-mode something like wood (for example) every 5 Seconds.

3. How can i set a Limit for Items in the Inventory: No Hero or Unit should carry an item more then once. And it should be unable to pick up or buy the same item twice

thanks

Darth Eye

PS.: the most problems that i have are the conditions^^°
Darth Eye is offline   Reply With Quote
Old 11-18-2008, 04:57 PM   #2 (permalink)
 
DarkAngelAzazel's Avatar

Envoy of the Apocalypse
 
Join Date: Sep 2008
Posts: 412

DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)


1.
a
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to (YourItem)
Then - Actions
Unit - Add (YourAbility) to (Triggering unit)
Else - Actions

When a unit gets an item this trigger checks wether it is "youritem" and if it is then it adds the ability to the unit.

1.2
a
Events
Unit - A unit Loses an item
Unit - A unit Pawns an item (to shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to (YourItem)
Then - Actions
Unit - Remove (YourAbility) from (Triggering unit)
Else - Actions


When a unit gets an item this trigger checks wether it is "youritem" and if it is then it removes the ability to the unit.

2. First:
a
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to (YourAbility)
Actions
Unit Group - Pick every unit in StandbyUnits and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering unit) Equal to (Picked unit)
Then - Actions
Set Boolean = False
Unit - Set (Triggering unit) acquisition range to (StandartAcqusitionRange)
Unit - Set (Triggering unit) movement speed to (Default movement speed of (Triggering unit))
Unit Group - Remove (Triggering unit) from StandbyUnits
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Boolean Equal to True
Then - Actions
Unit Group - Add (Triggering unit) to StandbyUnits
Unit - Set (Triggering unit) acquisition range to 0.00
Unit - Set (Triggering unit) movement speed to 0.00
Else - Actions
Set Boolean = True

When a unit uses the ability this trigger checks if the unit is in the unit group "StandbyUnits" and if it is, it is removed. If not it is added.

Second:
a
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in StandbyUnits and do (Actions)
Loop - Actions
Player - Add 5 to (Owner of (Picked unit)) Current gold

Every 5 seconds this trigger picks every unit in "StandbyUnits" and adds 5 gold to the owner of the unit for each unit.

3.
Stack Items
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Deku Stick
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item carried by (Triggering unit) in slot (Integer A)) Equal to (Item being manipulated)
Then - Actions
Set SlotNumber = (Integer A)
Else - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Integer B) Not equal to SlotNumber
(Item-type of (Item carried by (Triggering unit) in slot SlotNumber)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer B)))
Then - Actions
Item - Remove (Item being manipulated)
Else - Actions

This trigger checks if a unit already has the item when picking up a new one. If it has then the new one is removed. You can also use Hero - drop.

This are a lot of triggers... I think they all should work but I am not completly sure...
__________________
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe"

Quote from Albert Einstein
DarkAngelAzazel is offline   Reply With Quote
Old 11-18-2008, 05:50 PM   #3 (permalink)

User
 
Join Date: Sep 2008
Posts: 4

Darth Eye is an unknown quantity at this point (0)


wow o.o thanks allot that will help me allot *domo arigatou gozaimasu*

/Edit: can you tell me which Variables do you used?
For "StandbyUnit" i created one:
Quote:
Name: StandbyGroup
Typ of Variable: Unitgroup
Startvalue: empty Unitgroup
sorry >.<
to 1.2: A certain Unit-typ (like Soldiers oder Mailhalls) should be erased from the Map from the Player who dropt den Item. Like the Unit who owned the Item use the Spell he got from that Item to summon or create another Unit. Now if the Summoner drop the Item the summoned Units should be erased.^^°

Last edited by Darth Eye; 11-18-2008 at 06:22 PM..
Darth Eye is offline   Reply With Quote
Old 11-18-2008, 06:57 PM   #4 (permalink)
 
DarkAngelAzazel's Avatar

Envoy of the Apocalypse
 
Join Date: Sep 2008
Posts: 412

DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)


a
Events
Unit - A unit Spawns a summoned unit
Conditions
(Unit-type of (Summoned unit)) Equal to (Unit your item spawns)
Actions
Set SummonUnit = (Last created unit)

a
Events
Unit - A unit Loses an item
Unit - A unit Pawns an item (to shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to (YourItem)
Then - Actions
Unit - Remove (YourAbility) from (Triggering unit)
Unit - Remove (Summond Unit) from game
Else - Actions

Variables:

Summoned Unit = Unit
(If meant to be used by more than 1 hero at the same time ) = array
Then use Summond Unit[Player Number of (owner of (triggering unit))]

StandbyUnits = Unit group

Boolean = boolean...

Slot number = integer
__________________
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe"

Quote from Albert Einstein
DarkAngelAzazel is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

All times are GMT. The time now is 08:51 PM.






Your link here 
Loans | Debt Consolidation | Loans | Credit Cards | Free SMS
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle