Addind new scar in wincondition (Bodycount) only display on screen
#1
Posted 04 June 2018 - 05:30 PM
#2
Posted 04 June 2018 - 05:50 PM
For a stand-alone win condition, ... It is not properly coded brother...
I would use only only one rule, for example.
Anyway, from a quick look, I saw 2 inconsistencies:
1] g_Player1 and g_Player2 are not defined. These are the player IDs, and you must use World_GetPlayerAt(slot)
2] This is serious: You used Rule_AddInterval, to call a rule that also has a Rule_AddInterval !!!!
Which means that on the second pass of the first one, the second will be recalled. And you get a DUPLICATE rule error.
So, instead of
Rule_AddInterval(Rule_BodyCount_P1,1)
try
Rule_BodyCount_P1()
This you must do for P2 of course.
-----------------------------------------
I have recoded it in the new Survival, you can have a look there
The Rule_BodyCount_Players function does the trick, and it includes more players!
You just have to slightly modify it, and add the two lines first from the previous function:
local pID = World_GetPlayerAt(Tut_GetLocalPlayerIndex()) WinWarning_Add( "Player_body_count_surv", pID, "", "wincondition_name", "help tip text" )
If you still have issues, I can try and code it for you - but for two more weeks I will be extra busy (exams time!).
- jONES1979 likes this
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users