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

Fully GUI scripted map?

Status
Not open for further replies.
Level 3
Joined
Feb 28, 2010
Messages
33
Is it really a viable option? I have no knowledge of Jass and have no time nor intention of learning it. Is GUI triggering an option in creating a full Hero Castle Defense.




Pics Related, some terrain from my map.
 

Attachments

  • Mappy.jpg
    Mappy.jpg
    121.9 KB · Views: 118
  • Mappy2.jpg
    Mappy2.jpg
    161.2 KB · Views: 159
Level 28
Joined
Jan 26, 2007
Messages
4,789
Well, the easy answer would be 'yes', though that's not entirely true.
It's possible to create an entire map in GUI (I still use GUI, even though I know JASS) and JASS functions really aren't needed in a Hero Castle Defense.

The problem here is that you need to use Custom scripts (GUI actions for JASS functions), so basically you're using JASS withing GUI triggers.
If you're not entirely sure what I mean, I'm talking about removing memory leaks.
Like this trigger:
  • Set Location = Center of SomeRegion
  • Unit - Create unit at Location
  • Custom script: call RemoveLocation(udg_Location)
The last action is a custom script, which is JASS - though it is used in it's GUI-form.
Those tiny custom scripts (used only to remove memory leaks) are the only JASS-parts you need.

If you do not know what memory leaks are, or you wish more information on how to remove them or their background, there are plenty of tutorials here on the hive.

You have to learn these very tiny codes of JASS to script properly (about 3 codes, all with the same structure).
And I also suggest using loops, preset tables and combining as many triggers with about the same event as possible.
 
Level 3
Joined
Feb 28, 2010
Messages
33
Very helpful reply, great to know that i only have to learn a few small scripts that Ive probably seen somewhere in my messing around before. Im mostly still terraining and importing into the map at the moment and I have Jass spawn triggers left over from the map I converted it from (no idea which). This used to be a joint project but the guy I was working with bailed so I decided to start pretty much from scratch. Mostly a hobby when Im bored of playing customs.

Anyways, best place to start for GUI spawn examples, maps? screen shots? etc?
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
It is actually quite hard to create a full map in GUI, even if you count the CustomScripts as GUI, because some functions are only available in JASS, which makes mapmaking harder.

But yes, you can, I tried to. I failed.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you want a spawn system, you can use this one: Spawn System.
Everything is pre-made, you only need to set up the variables and you're done ^^

If you want to create one yourself, then it depends on what type you need.
Do you want units to spawn every X seconds, or on a special event (such as buying creeps to attack the enemy, the creeps will then spawn in the enemy's area).
I wouldn't use JASS triggers that were made by converting GUI though, they're pretty hard to read/edit (especially if you don't really know JASS).

@ Etzer: yes, depends on what kind of map you are creating - something with a damage detection system must be JASS, missile systems preferably JASS, but a hero defense? Doesn't sound hard to me.
I made a lot of maps in about 95-100% GUI (5% JASS for actions that do not exist in GUI or for simplicity).
 
Level 3
Joined
Feb 28, 2010
Messages
33
The map has a castle at the middle with 8 lanes that periodically spawn mobs to attack it, at certain intervals (10 or 15 minutes) the mobs change to harder ones but i suppose you would just create another spawn trigger for them and disable the previous one.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
The map has a castle at the middle with 8 lanes that periodically spawn mobs to attack it, at certain intervals (10 or 15 minutes) the mobs change to harder ones but i suppose you would just create another spawn trigger for them and disable the previous one.
No, you should only create 1 trigger for the spawn.

I would do it like this:
  • Init
  • Events
    • Map Init
  • Conditions
  • Actions
    • Set Unit[1] = Peasant
    • Set Unit[2] = Footman
    • Set Unit[3] = ...
  • Spawn
  • Events
    • Time - every 1 seconds of game time
  • Conditions
  • Actions
    • Set Timer = Timer + 1
    • If - Conditions
      • Timer mod (spawn interval) = 0
    • Then - Actions
      • Set Loc = SpawnLocation
      • Unit - Create X units of type Unit[Difficulty] at Loc facing X degrees
      • Custom script: call RemoveLocation(udg_Loc)
    • Else - Actions
      • If - Conditions
        • Timer mod (difficulty increment interval) = 0
      • Then - Actions
        • Set Difficulty = Difficulty + 1
      • Else - Actions
If you don't get this:
At map init, it creates a table of units with their difficulty (peasant will spawn first, then when the difficulty increases a footman will spawn etc).
Then we go to the spawn-trigger: the 'mod' us a very useful functions for things like this.
If your spawn interval is for example 1 minute (60 seconds), then you will have Timer mod 60.
This will return 0 when the timer is 60, 120, 180, ... (every 60 seconds :D).
Thus, every spawn interval seconds a unit will spawn with the current difficulty.
The difficulty then increases every X seconds as well.

If you still don't get it, the point of this thread is to ask for help, so ask away.
 
Level 3
Joined
Feb 28, 2010
Messages
33
Thats some beautiful stuff right there :cute:
I havnt triggered for quite a while but it wont take me long to get used to it again. Ill make a point to ask any and every question i have in the future :3

EDIT: im off to get some sleep now but thanks a heap for the advice, it will most certainly come in handy :)
 
Level 4
Joined
Apr 14, 2009
Messages
118
depends on what kind of map you are creating - something with a damage detection system must be JASS
Come on Ap0 :D (this is goldeh btw) Maze maps use unit detection systems (unit is within X feet = death) so all you have to do is edit that a tad and you should have a damage detection system :mwahaha:

Did you realize when you looked at my WIP morale system that it kind of detects damage....in a way o.0

So a damage detection system can possibly be made in GUI (i think):ap:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
depends on what kind of map you are creating - something with a damage detection system must be JASS

Come on Ap0 :D (this is goldeh btw) Maze maps use unit detection systems (unit is within X feet = death) so all you have to do is edit that a tad and you should have a damage detection system :mwahaha:

Did you realize when you looked at my WIP morale system that it kind of detects damage....in a way o.0

So a damage detection system can possibly be made in GUI (i think):ap:
That's not a damage detection system >.>

Yes: they can be made in GUI though, but they're very inefficient (because of the inability to remove events).
A damage detection system is: unit receives damage (not 'is attacked'), you know how much damage he received.
That's going off-topic though.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Even if Ac0 adverts my spawn system ( :D ) I have to say that it is possible. Yes JASS have some features which doesnt exist in GUI such as damage detection and trackables but you can use systems for that, config it in GUI or in JASS (usally very easy to do as they are easier to read than plain GUI)

goldeh that's a bad damage system and btw that one you pointed out would leak events to if you do it as you do with "Add event Your unit takes damage to Trigger"
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
here this should help you with the custom scripts and leaks that he was talking about in the first post

also a simple spawning system i used in my map looked like this
i dunno if it will help but mayby give some idea to how simple they can be
  • Event
    • Time - Every 20 seconds of the game time
  • Conditions
  • Actions
    • For Integer (Spawn) 1 to (Grunts[WaveNum]) do actions
      • Loop Actions
        • Create 1 grunt at your spawn point
    • For Integer (Spawn) 1 to (Headhunters[WaveNum]) do multiple actions
      • Loop Actions
        • Create 1 headhunter at your spawn point
    • For Integer (Spawn) 1 to (Shammies[WaveNum]) do actions
      • Loop Actions
        • Create 1 shammy at your spawn point
  • Event - Time elapsed is 840 seconds (make it when ever u want ur waves 2 be stronger
  • Conditions
  • Actions -
  • Set WaveNum = 2
  • Event - Time elapsed is 1250 seconds (make it when ever u want ur waves 3 be stronger
  • Conditions
  • Actions -
  • Set WaveNum = 3
create this for the other levels

  • Event - Map Initialization
  • Conditions
  • Actions -
    • Set Grunts[1] = 5
    • Set Headhunters[1] = 3
    • Set Grunts[2] = 10
    • Set Headhunters[2] = 6
    • Set Grunts[3] = 15
    • Set Headhunters[3] = 9
  • have what ever units u want
 
Status
Not open for further replies.
Top