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

how to make rounds????????

Status
Not open for further replies.
I have np. with triggers,but in main ,what trigger should i use to do it.
I think i should first shut down some triggers when the game is over,then i should make a black screen trigger,and then i should make some triggers that active the deactivated trigger.
So in main my problem is,how to bring all units from the map,in the starting position,and i mean too the death units.
So like a reset.
Can u help me with this please?
 
Level 12
Joined
May 22, 2015
Messages
1,051
If you set up a trigger to spawn the starting units, it will be much easier. You can just remove all the units and then run that trigger to create new ones.

If you write some bad JASS code (make a new trigger, edit -> convert to custom script, write some stuff that is obviously not code: saklfdasdf) and then try to save your map, it will pop up with an debug window that shows you all of the JASS code that is generated for your map.

Units placed in the map editor actually generate some JASS code. If you are comfortable with JASS, you can go through the code and copy out the part that spawns all your starting units.

Then you delete the units on your map and use the copied JASS code in the new trigger that you can use to spawn all of the starting units.

I haven't tested if this works, but I did notice this while working on something else that involved purposely writing an error (it was to get the exact camera bounds normally given to my map).
 
If you set up a trigger to spawn the starting units, it will be much easier. You can just remove all the units and then run that trigger to create new ones.

If you write some bad JASS code (make a new trigger, edit -> convert to custom script, write some stuff that is obviously not code: saklfdasdf) and then try to save your map, it will pop up with an debug window that shows you all of the JASS code that is generated for your map.

Units placed in the map editor actually generate some JASS code. If you are comfortable with JASS, you can go through the code and copy out the part that spawns all your starting units.

Then you delete the units on your map and use the copied JASS code in the new trigger that you can use to spawn all of the starting units.

I haven't tested if this works, but I did notice this while working on something else that involved purposely writing an error (it was to get the exact camera bounds normally given to my map).
Not bad idea,thanks.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Units placed in the map editor actually generate some JASS code.
Only if linked to triggers. Otherwise they are thrown into the .doo files.

Anyway the idea is...

End -> Destroy -> Initialize -> Start

End is when your round ends. Depends on map type and then triggers the destroy phase.

Destroy is when you get rid of the current map state. this includes removing all progress players have made, all out of place units, all created objects (eg active abilities etc).

Create is when you set up the map. You re-create all units, destructibles, items etc. You also re-initialize all systems of the map so they have default state. The only system that should not be reset is the round counter itself which should persist the round state.

Start is when players get control again. Each start phase should have the same player state as each other start phase.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Only if linked to triggers. Otherwise they are thrown into the .doo files.

Anyway the idea is...

End -> Destroy -> Initialize -> Start

End is when your round ends. Depends on map type and then triggers the destroy phase.

Destroy is when you get rid of the current map state. this includes removing all progress players have made, all out of place units, all created objects (eg active abilities etc).

Create is when you set up the map. You re-create all units, destructibles, items etc. You also re-initialize all systems of the map so they have default state. The only system that should not be reset is the round counter itself which should persist the round state.

Start is when players get control again. Each start phase should have the same player state as each other start phase.

Ah thanks for the clarification. I only saw it briefly while scrolling through the thousands of lines of JASS lol.

---------------------------------------------------------------------------------------------

It's worth noting that not everything can be reset properly - upgrades cannot be lowered.

I think if you want a way to restart your map without reloading everything, you need to think about it as you go - from the very beginning. Adding it in later will only make it harder and harder.

I know in my map, I've had to rip out old systems to put in new ones and it was quite a pain with just those. At least they were limited to certain sections of the triggers so I only had to redo / change around 10% of my code at a time. Changing your map to be able to completely refresh itself would require me to rip out things from basically every part of my map and redo them. I'm already doing a lot of that, but it would be 10 times worse to do the whole map all at once.

All I'm saying is to just not leave something like this and figure out how each part of your map will work with a restart mechanism before making them.
 
Only if linked to triggers. Otherwise they are thrown into the .doo files.

Anyway the idea is...

End -> Destroy -> Initialize -> Start

End is when your round ends. Depends on map type and then triggers the destroy phase.

Destroy is when you get rid of the current map state. this includes removing all progress players have made, all out of place units, all created objects (eg active abilities etc).

Create is when you set up the map. You re-create all units, destructibles, items etc. You also re-initialize all systems of the map so they have default state. The only system that should not be reset is the round counter itself which should persist the round state.

Start is when players get control again. Each start phase should have the same player state as each other start phase.
That's exactly what i will do on some maps.
THE CASE IS OVER.
P.S.I should write before that the case is finished.
 
Status
Not open for further replies.
Top