System Lag-free line-spawning system

LightChaosma

New Member
Reaction score
60
in the first loop, the one of 25, this is the one where is specified how many creeps each pleyer gets. in there is a loop of 8, 1 for each player, that checks if playeractive = 1 (true) and then spawns a creep at the designated place. in that loop is a unitgroup loop, for special attributs for the last spawned creep, to make it walk the right path, and for sme towers to trigger dummtskills

@dannyboydude
getting experience, well in very minor things, you try reading, yes im referring to chinese agian, chinese, and learn from it without a base knowledge. luckyly im pretty quikck understanding with codes, so i get what it sais, but i'm far from edeting it.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Ok, updated initialization trigger.

JASS:
//*************************************************************************
//This sets all active players, and decides which waves spawn which units.*
//*************************************************************************

//**************************************************
//*This is where you can set the number of players.*
//**************************************************
globals                                          //*
constant integer Players = 8                     //*
endglobals                                       //*
// *************************************************                 


function Trig_Actions_05 takes nothing returns nothing
    set udg_Wave[1] = 'hpea'  //Peasant
    set udg_Wave[2] = 'hfoo'  //Footman
    set udg_Wave[3] = 'hkni'  //Knight
    set udg_Wave[4] = 'hrif'  //Rifleman
    set udg_Wave[5] = 'hmtm'  //Mortar Team
endfunction

function Trig_Func_03 takes nothing returns boolean
    if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
        return false
    endif
    return true
endfunction

function Trig_Actions_04 takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = Players 
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        if ( Trig_Func_03() ) then
            set udg_ActivePlayer[GetForLoopIndexA()] = true
        else
            set udg_ActivePlayer[GetForLoopIndexA()] = false
        endif
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_004 takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerAddAction( t, function Trig_Actions_04 )
    call TriggerAddAction( t, function Trig_Actions_05 )
endfunction


Added in a global for number of players, and said which Raw Codes are which units.
 

LightChaosma

New Member
Reaction score
60
using this i get 2 errors:
errorsxp1.jpg

didnt diable the wave setter trigger though, does that matter?

disabled them now. Wc3 refuses to open this map... i see it in the list, but it doesnt even show the player slots, it reqognizes 8 players, but thats about it
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I said this earlier,

If it says undeclared variable, ignore it. It's just the vJass syntax.

It will still work, I just tested it.

And can I just use IntegerA and IntegerB instead of Spawn_int?
 

LightChaosma

New Member
Reaction score
60
no, there are other things using these, i made those vars becuz when these other triggers were fired during the spawning, the spawning ended. due to the wait...

EDIT:

read post above: i edited it, i'll send a screen
errors2xj3.jpg
the 2 players that you see are from a 2-player melle map i clicked earlier, if i click a 12 player map before this one, i get 12 players, and when i press start games, it does nothing
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
If you're using the 'Test Map' feature on NewGen, make sure the option 'Start War3 with Grimoire' option under Grimoire is disabled. This will mess you up if you use 'Test Map'.
 

LightChaosma

New Member
Reaction score
60
i know, i have that, i use test map, and then it just opens Wc3, not the map, WC3... wich is stragne on its own....
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Try opening Wc3 on your own, instead of 'Test Map', then try to make it. I've had this problem in NewGen b4.
 

dannyboydude

Ultra Cool Member
Reaction score
33
Ok if it shows you the main screen it means your trigger is bugged and not funtioning properly

Ren check the trigger for typo's or something
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I just tested this on my own. It's all working fine. I had no errors.
 

LightChaosma

New Member
Reaction score
60
ok, i tried:
- start via wc3 - fail
- start via wc witch WE closed - fail
- disable the JASS you wrote - works > test map bit solved, it goes to the WC3 start screen because it cant start the map...

if thats true, my guess is that the bloean integer thing is bugging, lemme diable all my other triggers... will be a pain reworking those though...

EDIT!!!
NOTE>>> when i try to reenable your JASS it sais the following:

"the trigger player activeJASS must have an initialisation function called: InitTrig_active_playerJASS" (i neamed the trigger active playerJASS
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It's working on mine, I don't know where this is going wrong.

It might me your map that's crashing, can you send me a link to your map? I'll see what's going wrong.
 

LightChaosma

New Member
Reaction score
60
i just edited my above post, maybe thats something?
will send map in a bit, hold on

EDIT: the name means: copy of ...
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Here, you forgot to change the InitTrig to the name of your trigger, and you didn't add in new variables.
 

LightChaosma

New Member
Reaction score
60
add in new variables? where did i need to, it was already correct, 8 players..

ima leave the unit types like this till i'm sure itll work..

but, i must say aftyer looking at it for like 2 hours, made me understand JASS, thx for that in advance:D
 

Flare

Stops copies me!
Reaction score
662
Wee bit of optimization on Renendaru's trigger :p
JASS:
//*************************************************************************
//This sets all active players, and decides which waves spawn which units.*
//*************************************************************************

//**************************************************
//*This is where you can set the number of players.*
//**************************************************
scope GiveItAName initializer InitFunc
globals                                          //*
constant integer Players = 8                     //*
//Gonna swap udg_ globals for vJASS globals, much easier for importing and much nicer looking =D
integer array UnitId
boolean array Active
endglobals                                       //*
// *************************************************                 


function ArraySetup takes nothing returns nothing
    set UnitId[1] = 'hpea'  //Peasant
    set UnitId[2] = 'hfoo'  //Footman
    set UnitId[3] = 'hkni'  //Knight
    set UnitId[4] = 'hrif'  //Rifleman
    set UnitId[5] = 'hmtm'  //Mortar Team
endfunction

//No more lame GUI If condition func <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />

function Trig_Actions_04 takes nothing returns nothing
local integer i = 0
    loop
        exitwhen i == Players
        if GetPlayerSlotState(Player (i)) == PLAYER_SLOT_STATE_PLAYING then //And instead of lame GUI If condition, we&#039;ll just put it here and use a local
            set Active<i> = true
        else
            set Active<i> = false
        endif
        set i = i + 1
    endloop
    call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
private function InitFunc takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerAddAction( t, function Trig_Actions_04 )
//And array setup (no point defining the array values everytime the trigger fires)
    call ArraySetup ()
endfunction</i></i>


"the trigger player activeJASS must have an initialisation function called: InitTrig_active_playerJASS"
Just ignore that :p Grimoire (I think) is supposed to take care of those errors being displayed, but it doesn't actually have any effect, assuming you're using NewGen
 

LightChaosma

New Member
Reaction score
60
im getting told to ignore a bunch of errors here.... well ok, thx for the update flare.

FLARE, a question, in my wave trigger do i have to make a ne variable called unitID to make it work?
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Well Flare can clean this next one too I guess. I use the GUI stuff cause it really works all the same. There's a tiny bit of speed difference, but I"m not into advanced stuff yet.
 

LightChaosma

New Member
Reaction score
60
trigger not working (rend's version)

i already made it bloean, but it destroys all units, even the onces from active players...

Code:
remove player buildings
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ActivePlayer[(Integer A)] Equal to False
                    Then - Actions
                        Set temp_unitG[1] = (Units owned by (Player((Integer A))))
                        Unit Group - Pick every unit in temp_unitG[1] and do (Actions)
                            Loop - Actions
                                Unit - Kill (Picked unit)
                        Custom script:   call DestroyGroup (udg_temp_unitG[1])
                    Else - Actions
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Make the event, 'Elasped time is 0.00 seconds'.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top