• 🏆 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!

Item starting a quest

Status
Not open for further replies.
Level 3
Joined
Sep 7, 2009
Messages
22
First let me say that I am a complete noob about using the editor—this is my very first project.

So what I'm trying to do is have a unit drop an item when they die, and then whichever player picks up the item will receive a quest. I have figured out how to make the unit drop the item, but I'm still unable to figure out the quest for one player only.
Could anyone please make a step by step tutorial on how to do this?

Thanks! :grin:

P.S. This is off topic, but how can you change how much damage a unit does?
 
Level 6
Joined
Aug 22, 2008
Messages
123
Hello Panda

The following explanation requires some triggering skills. If you do not know how to create an action in a trigger or use custom scripts, you should read how to handle triggering first.

Explanation
First of all (map initialisation) you should create the quest you want to start when that item is picked and mark him as not discovered.

Afterwards you need to create a trigger whose event is "unit acquires an item" and check whether the picked item is the item you wish to be the quest starter.
Now add to the actions this line using the custom script function:
Code:
if GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit()) then
Afterwards you use the normal GUI function to mark a quest as discovered.

When you are done with that you put another custom script line containing this:
Code:
endif

Warning:
I did not test this myself on multiplayergames and therefore do not know whether this will already cause a desync. If it does, you will need to google for some safer ways to realize your project.:wink:
 
Level 3
Joined
Sep 7, 2009
Messages
22
Hello Panda

The following explanation requires some triggering skills. If you do not know how to create an action in a trigger or use custom scripts, you should read how to handle triggering first.

Explanation
First of all (map initialisation) you should create the quest you want to start when that item is picked and mark him as not discovered.

Afterwards you need to create a trigger whose event is "unit acquires an item" and check whether the picked item is the item you wish to be the quest starter.
Now add to the actions this line using the custom script function:
Code:
if GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit()) then
Afterwards you use the normal GUI function to mark a quest as discovered.

When you are done with that you put another custom script line containing this:
Code:
endif

Warning:
I did not test this myself on multiplayergames and therefore do not know whether this will already cause a desync. If it does, you will need to google for some safer ways to realize your project.:wink:

Could you be a bit more specific on how to do that? As I said, this is my first time using the editor, and my project is fairly complex. :wink:
 
Status
Not open for further replies.
Top