• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Multiboard food water etc

Status
Not open for further replies.
Level 9
Joined
Jun 20, 2008
Messages
476
In my map i made a multiboard (quite simple)

it contains a timer and an item for food

it works for all players now but i want if player 1 eats meat that the food goes up by 10 the problem is that when player red does it it will also do it for player blue and like that its very easy to survive

solution plz (i give rep) (and cred)
 
Level 5
Joined
Dec 18, 2007
Messages
205
could you please psot your triggers you use to icnrease the food values (not the multiboard, just how you increae variables) and then explain me one thing: do you mean that "meat" is an item that increaes your variable by 10?

greetings
 
Level 9
Joined
Jun 20, 2008
Messages
476
  • multiboard implant
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 1 columns and 2 rows, titled StatsBoard
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (food + (String(food[0])))
      • Multiboard - Set the color for (Last created multiboard) item in column 1, row 2 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNWindWalkOff.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 2 to war3mapImported\BTNINV_Misc_Food_25.blp
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to (((((String(inth[1])) + (String(inth[0]))) + :) + (String(intm[1]))) + ((String(intm[0])) + (: + ((String(ints[1])) + (String(ints[0]))))))
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 15.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 2 to 15.00% of the total screen width
      • Multiboard - Show (Last created multiboard)
  • multiboard2
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set food[0] = (food[0] - 1)
  • settings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set food[0] = 100
(meat is a item wich increases the food by10)
 
Level 5
Joined
Dec 18, 2007
Messages
205
i don't get you problem sorry xD
there is no trigger that increases the food value variable and according to your integer array, you just have 1 player in the map that will use the food, because you don't use the other array values.
you need to create a multiboard for every player or a multiboard for all player where all values are standing and a trigger that fires when the unit is pickung up an item. destroy the item and increase the food[playernumberof(triggeringplayer)-1]=food[playernumberof(triggeringplayer)-1]+10
 
Level 5
Joined
Dec 18, 2007
Messages
205
isn't it all said above??
well i'll take some minutes and post it afterwards.

-> actually i'm going to eat, so i may post it in about half an hour, excuse me

EDIT: map attached, if you have any questions don't hesitate to ask.

It is important to copy the map header custom-script, as it is needed for the multiple multiboards.
Copy all triggers in the food folder to get the system work properly. Remember to make unknown variables be created at default, so that "mboard" will be created automatically.

greetings
 

Attachments

  • example.w3x
    19.5 KB · Views: 44
Last edited:
Level 5
Joined
Dec 18, 2007
Messages
205
Well, they work, this map works good, very good work, you have to re-accept the custom scripts... then they work... (click on them twice and then click on ok, do that for each custom script), very good example.

thanks redscores :)
but why are they disabled by default? i know i disabled some test custom script (BJDebugMsg), but they are not necessary for the script anyways.
 
Level 5
Joined
Dec 18, 2007
Messages
205
no definetly not, because i tested it after disabling the sections, too.
but nvm it works anyway and i think you problem is solved medion, isn't it?
 
Status
Not open for further replies.
Top