HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to make a simple interaction with another on map?!?

06-12-2005, 11:19 AM#1
Guest
What the title says,

How to make like a simple interaction with another character on the map. Say a villager or something...then once that villager tells you whatever, then the quest screen comes up saying..Destroy enemy or something.

Thnx
06-12-2005, 12:36 PM#2
Anitarf
You would use triggers to do that. Triggers are a special warcraft code that you can set up in the trigger editor, that do certain actions on game events. For example, in your case, when a player's hero comes within a certain range of the villager (the event), a trigger would create a new quest (the actions). Then, when the enemy you have to kill dies (another event), the quest is completed (another action).

You can check the Triggers and Scripts forum of the Developer's Corner section for all the information about triggering, and post your own trigger-related questions there.
06-12-2005, 01:56 PM#3
Guest
What event type would it be for the first example?...

Like when the Hero comes within a certain distance of say a villager...what event type shall I choose?
06-12-2005, 02:57 PM#4
Anitarf
Event - unit - unit within range

Then you just need a condition which would be a unit or a unit-type comparison to determine if the triggering unit (that is, the one that came within range) is your hero. You could instead just check if the triggering unit is a hero (boolean - unit classification check) or if the triggering unit belongs to the player who controlls the hero (player comparison). Any of these conditions is enough to prevent the trigger actions from happening whenever any other unit comes close to the villager.

Then, the actions themselves, you will probably create a quest, then set it to a variable (so you can reference it afterwards); you can define variables in the variable editor (the yellow X icon at the top of the trigger editor). Then you would show some quest messages, flash the quest menu button, and that's it (you can find all the actions to do this in the quest category, except the set variable action, which is in the general category).