System AMS - Advanced Multiboard System

Mike889

New Member
Reaction score
15
No. I should make a new trigger
-Event- a unit dies
-Condition - trigger unit is a hero = true
-Actions - custom script call amsTS_IncreaseScore(Triggering unit, Death, +1)
call amsTS_IncreaseScore(Killing unit, Kill, +1)

Something like this?

JASS:
function Trig_Player_Number_Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Player_Number_Actions takes nothing returns nothing
    call amsTS_IncreaseScore(( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) - 1 ) ,TAG[1],+1)))
endfunction
function Trig_Player_Number_Actions takes nothing returns nothing
    call amsTS_IncreaseScore(( GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ())) - 1 ),TAG[0],+1)))
endfunction
          

//===========================================================================
function InitTrig_Player_Number takes nothing returns nothing
    set gg_trg_Player_Number = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Player_Number, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Player_Number, Condition( function Trig_Player_Number_Conditions ) )
    call TriggerAddAction( gg_trg_Player_Number, function Trig_Player_Number_Actions )
endfunction


Argh, it returned me a syntax error =/
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Try this:

JASS:

function Trig_Player_Number_Conditions takes nothing returns boolean
    return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO)
endfunction

function Trig_Player_Number_Actions takes nothing returns nothing
    call amsTS_IncreaseScore( GetPlayerId(GetOwningPlayer(GetTriggerUnit())),TAG[1],1)
    call amsTS_IncreaseScore( GetPlayerId(GetOwningPlayer(GetKillingUnitBJ())),TAG[0],1)
endfunction
          

//===========================================================================
function InitTrig_Player_Number takes nothing returns nothing
    set gg_trg_Player_Number = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Player_Number, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Player_Number, Condition( function Trig_Player_Number_Conditions ) )
    call TriggerAddAction( gg_trg_Player_Number, function Trig_Player_Number_Actions )
endfunction
 

Mike889

New Member
Reaction score
15
Hmm, I will try this =D Hmm... what's wrong with the BJ? Every time i use convert to custom text they're there. Time to do some google at this forum =D
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Hmm, I will try this =D Hmm... what's wrong with the BJ? Every time i use convert to custom text they're there. Time to do some google at this forum =D

If you install NewGen with TESH or JassCraft, you'll be able to check those BJs and see what they actually do:

Call a series of natives.


This is why people sometimes replace BJs with smoother, faster JASS
 

Mike889

New Member
Reaction score
15
Mine have TESH =D But I'm still missing something out, i can't find what.
I made the variable and it's set at AMS trigger. >.<


EDIT:

JASS:
function Trig_Scores_Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Scores_Actions takes nothing returns nothing
    call amsTS_IncreaseScore( GetPlayerId(GetOwningPlayer(GetTriggerUnit())),udg_TAG[1],1)
    call amsTS_IncreaseScore( GetPlayerId(GetOwningPlayer(GetKillingUnitBJ())),udg_TAG[0],1)
endfunction

//===========================================================================
function InitTrig_Scores takes nothing returns nothing
    set gg_trg_Scores = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Scores, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Scores, Condition( function Trig_Scores_Conditions ) )
    call TriggerAddAction( gg_trg_Scores, function Trig_Scores_Actions )
endfunction


I added udg_ before TAG and i could save it. Now I'm going to test =D

Thanks Magentix! Now it's working ^^ And i think there's no problem with using BJ. Anyway, i still can't +rep you xD How many +reps you must distribute before +reping someone again?
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Nice you got it working, although I am surprised you used GUI global variables.

In amsTS there is a part of the config that requires you to set TAG
JASS:

    set TAGS_PER_PLAYER         = 2
    set TAG[0]                  = &quot;[Gold]&quot;
    set TAG_DEFAULT_VALUE[0]    = &quot;0&quot;
    set TAG[1]                  = &quot;[Lumber]&quot;
    set TAG_DEFAULT_VALUE[1]    = &quot;0&quot;


If you do that, there shouldn't be an error about not finding TAG
 

waaaks!

Zinctified
Reaction score
255
any new updates? when will u post a demo map for each mod....or maybe u can post the open RotG map in the thread, showing that RotG uses the system, and maybe people wants to use the multiboard used by RotG...well im not using the map already, so, everyone can get the open version
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
One question, can I use your system for only one multiboard? Because I don't see any function that includes a multiboard variable oO
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
The system creates one for you, you don't need a multiboard variable ;)

You create a Multiboard (case sensitive) on which you apply methods.

I'll upload the RotG code shortly then.

Nvm this one as it used a lot of variables that were specific to RotG.
I will however try to find some time off from Project Nethershard to edit this.

(Got 2 weeks off soon)
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Methods are a thing I don't understand well atm, but am I able to create 2 different multiboards and change their values with your sys?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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