• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Lots of Questions...

Status
Not open for further replies.
Level 2
Joined
Oct 11, 2006
Messages
14
Now I've got a lot of questions to you.
I am now programming my own ORPG, let's better say, I'm trying... And for this I need lots of answers to my questions...

1.) I want to have a building (f.e. a normal City House), in which you can klick on a button (like ability) and then you loose 15 gold and you get full mana and full health. How does this work?

2.) I want to have my map dividet in seperate areas. And if you enter a new area, there should be a message displayed. Like "You are now entering Timbuktu"...

3.) How can I set Starting Positions, without a building, only with an unit? I knew this once, but now I've forgotten it...:wink:

Thanks a lot! :infl_thumbs_up:
But there will be lots of other questions...
 
Level 2
Joined
Oct 11, 2006
Messages
14
Next questions...:grin:

4.) I want to have a scientist with a gigantic bear. He tells the player that he wants to bring it to his hometown. But the bear is agressive.
Now my question: If the bear gets killed, how can i do it that the scientist and his crew turn to enemies?

5.) How can I create a group of enemies, which, if its killed, spawns again at the same place after X minutes
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,115
I guess you haven't heard about triggers (shortcut: F4) in World Editor.

1) this is how your trigger will look:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Life of (Triggering unit)) Less than or equal to ((Life of (Triggering unit)) - 5.00)
      • ((Triggering player) Current gold) Greater than or equal to 15
    • Actions
      • Player - Add -15 to (Triggering player) Current gold
      • Unit - Set life of (Triggering unit) to 100.00%
I hope this helped. else you can visit our tutorials section for more teaching about triggers.
2)In the terrain editor you can create rects/regions. make a trigger like this:
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Rect 000 <gen>
    • Conditions
    • Actions
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Entered Timbuktu
3) go to trigger editor and delete the triggers called "melee initializations"

4)
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Change ownership of Peasant 0001 <gen> to Player 2 (Blue) and Change color
make a trigger looking like this. but replace the unit types with what you need.

5) you can make unitgroups. in the variable editor create a variable of the type unitgroup:
create a lot of units and add them to the usergroup and make this trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in MyUnitgroup) Equal to True
    • Actions
      • Wait 2.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
I dunno why I made all these examples, you should learn triggers yourselfl

Hope it helps
 
Level 2
Joined
Oct 11, 2006
Messages
14
I'm sorry for that questions, it wasn't me, who posted this, it was my brother...
You should know that Grober.Rasta is two persons in one :grin:
The one who asks those stupid questions, is my brother, and he hasn't really heard of triggers yet. But he wants to help me by doing this, so pls help him, otherwise i will have two probs: My RPG and my crying brother :wink:
So thx for helping him...
 
Level 7
Joined
Oct 8, 2005
Messages
298
dude if your brother doesnt know how to create any of those triggers... he shouldnt be trying to make an rpg. tell him to learn how to use the WE like i did, just sit down at the computer one day and try making a map. I did that and i learned how to use and manipulate every aspect of the WE and am now excellent at using it.
 
Level 2
Joined
Oct 11, 2006
Messages
14
Thanks for your grace by answering with those helpfull comments...:wink:
Now I've got a question myself... It's not my day today, so this might be a stupid question, but my trigger does not work... Can anyone help me?

  • Ricercatore Baer1
  • Events
    • Unit - Unit - Raging Bear 0041<gen> gets attacked
  • Conditions
  • Actions
    • Game - Display to (All Players) the text: Stop!...
 
Level 2
Joined
Oct 11, 2006
Messages
14
I chose Unit - Specific Unit Event as an event...
I thought that this would work, but as I have tested it several times, there was nothing but silence :wink:
 
Level 2
Joined
Oct 11, 2006
Messages
14
I just copied it^^
Ok, nevertheless no one here can help me?? I will try it again, by programming it all new (it's not that much :wink: ) and I hope it will work then... If not I'd have a problem... :sad:
 
you shouldn't use specific event, because it can store only generated variable, not global. It's better to use action on initialization: Trigger - Add event, this "event" actualy can store a global variable. Ff you have more actions reffering to that unit, if you want to change it's type, you will have to change it for each action unles you use variables.
There is a tutorial about variables that Ralle or Archian wrote... check it out.
And there are many good tutorials all over the web. Google it:grin:
 
Level 7
Joined
Nov 12, 2005
Messages
299
> this "event" actualy can store a global variable
It can't actually. Events can't store global variables, they only store their values.
For example you set a variable called u to some preplaced footman and add the event for u on map initialization the way you said it. Now what happens if you change u to some rifleman later? Nothing...the event still affects the footman.
 
> this "event" actualy can store a global variable
It can't actually. Events can't store global variables, they only store their values.
For example you set a variable called u to some preplaced footman and add the event for u on map initialization the way you said it. Now what happens if you change u to some rifleman later? Nothing...the event still affects the footman.

yes... now i remember. This was like i was retarded:bored:. Because i've seen damage over head system that has to set ght global each time fired... but an event each time reads the variable as it was set on initialization or sumwere else...

BUT: Will this add event to trigger and delete another one? if it doesnt, there will be 10000000000 events in trigger , wich will fire for each time... 1000000000 times instead of one... that's way damage over head i used before was so laggy...
 
Level 2
Joined
Oct 11, 2006
Messages
14
Ok, thanx for your help...

Now i've got another Question. I want to have a dialog coming up by starting the map. There are 8 players in this map 4v4, and for the first group i want to have the dialog "left", for the other group the dialog "right". I've worked out a few triggers, but none of them worked. Could anyone help me plz?

This is the Trigger for the Groups
  • AddLeft
  • Events
  • Conditions
  • Actions
    • Playergroup - Add Player 1 (red) to Left
    • Playergroup - Add Player 3 (teal) to Left
    • Playergroup - Add Player 6 (orange) to Left
    • Playergroup - Add Player 5 (yellow) to Left
Sry i don't know the exact translation for "Spielergruppe", cause i've got the german editor...


This is the Trigger for the Dialog
  • PickRace Left
  • Events
    • Time - Elapsed game time is 2.00 seconds
  • Conditions
    • (Picked Player) Equal (Random player from Left)
  • Actions
    • Dialog - Change the title of Diffdialog to Please choose your race
    • Dialog - Create a dialog button for Diffdialog labelled Humans
    • Set Humans = (Last created dialog Button)
    • Dialog - Create a dialog button for Diffdialog labelled Dwarfs
    • Set Dwarfs = (Last created dialog Button)
    • Dialog - Create a dialog button for Diffdialog labelled Gnomes
    • Set Gnomes = (Last created dialog Button)
    • Dialog - Create a dialog button for Diffdialog labelled Elfes
    • Set Elfes = (Last created dialog Button)
For the other group it's the same, just changed names...


If I now start my map, all buttons are shown, but i only want to show 4 of 8 buttons... Can u plz help me? Thx
 
Level 13
Joined
Jun 22, 2004
Messages
783
You only create 4 buttons, how can you get 8 buttons then?

And in your pick race, your condition doesn't match up with your event, since you have not yet declared a picked player yet, atleast not for as far as I can see.
 
Level 7
Joined
Nov 12, 2005
Messages
299
Your first trigger doesn't have an event or you simply haven't posted it.
There is no Picked Player or any other response in the second trigger, at least not in the conditions. Use a Pick every player in player group and then use a show dialog action for the picked player inside the loop (which you also seemingly forgot to add there).
 
Level 2
Joined
Oct 11, 2006
Messages
14
Your first trigger doesn't have an event or you simply haven't posted it.
There is no Picked Player or any other response in the second trigger, at least not in the conditions. Use a Pick every player in player group and then use a show dialog action for the picked player inside the loop (which you also seemingly forgot to add there).

Thx, i'll try...
 
Status
Not open for further replies.
Top