• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

WC3 Campaign simillar spell.

Status
Not open for further replies.
Level 1
Joined
Aug 6, 2008
Messages
5
Hello people,

Im creating a RPG map, where i want some triggers to include heroes picking up certain items they need, and hand in to a guy for a small reward.

Ive tried working a little on the trigger, and looking through the wc3 campaign to try figure out how to do. But i cant seem to find out.

Anyone who can help me with the right trigger built? :) would be appreciated greatly.


OBS: Shouldent have said spell in topic o_O
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
That shouldnt be too difficult, I have a similar quest on my map and this is how I do it. forgive the roughness of this trigger but don't have WE installed on this comp so cant check it, I hope this atleast points you in the right direction.

Place a circle of power next to the quest unit that your hero will hand the item in too, then create a small region over the CoP then use this trigger:

Event: A unit enters (x) region
Conditions: Type of entering unit equal to (your hero)
Entering unit has (your item) in inventory
Actions: Quest complete (x) quest
Message: display message to player group-owner of triggeirng unit contaijng (your quest complete message)
Remove (your item) from hero inventory
Remove (circle of power x) this indicates that the quest is complete.
 
Level 1
Joined
Aug 6, 2008
Messages
5
Thank you for your answer. So far, so good.

If e.g. A hero needs to pick up 5 explosives, and i want him to get notified each time he picks up 1.

You know have

1/5 explosives
2/5 explosives.

How can i fix that one? :).

I hope you, or someone can be of assistance again. :grin:
 
Level 15
Joined
Jan 16, 2008
Messages
1,244
You create an integer variable named however you want(let's say exp) to count explosives. Then you make a trigger that reacts when an item of type explosive is picked with 2 actions; first to increase the count variable( exp = exp + 1) and the other to display a message( 'you have' + exp + '/5 explosives). That should do good.
 
Level 1
Joined
Aug 6, 2008
Messages
5
You create an integer variable named however you want(let's say exp) to count explosives. Then you make a trigger that reacts when an item of type explosive is picked with 2 actions; first to increase the count variable( exp = exp + 1) and the other to display a message( 'you have' + exp + '/5 explosives). That should do good.


Anyone that could be kind enough to show me the above, in the wc3 editor, as a draft? :)
 
Level 15
Joined
Jan 16, 2008
Messages
1,244
Okay here it is :D

  • Item counting
  • Events
  • Unit - A unit acquires an item
  • Conditions
  • (Item type of(Item being manipulated)) equal to YourItem
  • Actions
  • Set ItemCount = (ItemCount + 1)
  • Game - Display to (Player group((Owner of(Triggering unit)))) the text: ((String(ItemCount)) + /5 items collected.)
 
Status
Not open for further replies.
Top