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

[JASS] change meleeinitialization

Status
Not open for further replies.
Level 5
Joined
Aug 25, 2005
Messages
17
i made a 5th race which i want to integreate into a normal melee map whith all the melee initialization actions but the action: victory/defeat conditions makes some troubles because it does not seem to accept the new townhall as a townhall although i set its unit classification to townhall, so is there any way to modify the victory/defeat condition action so that the new townhall is accepted too and not only the ones of hu ud orc and ne
the problem is that i dont know any jass :(
 
Well, you can't choose the race in warcraft if that is what you want. In warcraft you can only choose 4 races elf, orc, ud and human.
Now your problem is easy to solve. In the object editor you must classify your structure as a town hall. After that you must go to advanced gameplay constants and add your town hall there as well. I think this will fix your problem.
 
Level 5
Joined
Aug 25, 2005
Messages
17
flame phoenix that exactly what i did but it seems not to be enough the melee initialization actions still do not accept the new townhall :(, you still get the message to set up a new townhall or u get visible to your opponent in 2 min
 
Level 3
Joined
Aug 15, 2007
Messages
67
Is there not a trigger that lets you make your own victoy/defeat? Like if player w/e has no more building he is defeated?
 
I know how to solve your problem with a new trigger.

Events
Every 2 seconds of game
Conditions
Actions
Pick all units owned by player 1 matching (matching unit is a structure equal to true) and do:
Loop actions
If/then/else Multiple actions
Loop
Condition
Units in group all units in (unit owned by player 1 equal to 0)
Then actions
and here you start the timer.
Else actions
Do nothing

This is the main trigger that will fire the timer.

This is the trigger for defeat:
Event
Timer bla bla expires
Conditions
Actions
And here you say that player 1 was defeated or was revealed, you choose

However the player can build a town hall during that time, in that case:
Event
A unit finish a construction
Condition
Or (Multiple conditions)
Unit-type of constructed structure equal to Town Hall
Unit-type of constructed structure equal to Tree of ages
Unit-type of constructed structure equal to (your new town hall)
and so on unit you put all town halls
Actions
destroy timer bla bla


This trigger is for the defeat. You can also use it to fire the timer when your get out of town halls. Just change the main trigger.
However it would also be a good idea to wait for HappyTauren's idea, as it is the best solution you will find.
 
Status
Not open for further replies.
Top