• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Trigger are not working

Status
Not open for further replies.
Level 2
Joined
Jun 19, 2016
Messages
26
Hello ! I have made a map, and in this map, i have made a system, the system is :

player cast a spell in a structure, the spell give a item to a unit, the unit use the item, but it's an random item ( from 1 to 6, basically a dice ), and for example if the item is 2 the unit move to case 2, the unit doesnt belong to the player ( it's like mario party )

But i have some problem with these trigger.

I have do some test so the trigger ( still not working ) is a bit different from the first version but it's still the idea..

Oh and i can't use the fonction this forum have ( the one who make the trigger appear here because my WE is in french. So i just post the map here, and yes sorry, variable will be in semi-french.

Sorry for this thread, but i don't have choice cuz i cant solve the problem, and sorry if u don't understand what i mean, ask me for info if u don't understand something.

Thanks in advance and sorry !
 

Attachments

  • Metaux's party version 0.1.w3x
    116 KB · Views: 32
Looks like Mario party, Your problem seems to be the "Moving Map", the one in which yo try to sneak to the star seller first. Played in Rounds.

I Recomment saveing all Moveable Positions (Rects) and their Centers (this avoids Leak cleaning every time you move) in an Array (a List) or Hashtable (2 d List) together with the options of next Positions.
This way you are able to detect the next Position.
To identyfi the Current Dice-roll i changed the Charges of your dices to 1-6.


  • Init Map
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Moveable_Rects[1] = Région Case 1 <gen>
      • Set Moveable_Position_Next1[1] = 2
      • Set Moveable_Rects[2] = Région Case 2 <gen>
      • Set Moveable_Position_Next1[2] = 3
      • Set Moveable_Rects[3] = Région Case 3 <gen>
      • Set Moveable_Position_Next1[3] = 4
      • Set Moveable_Rects[4] = Région Case 4 <gen>
      • Set Moveable_Position_Next1[4] = 5
      • -------- and so on --------
      • -------- Crossover --------
      • Set Moveable_Rects[10] = Région Case 10 <gen>
      • Set Moveable_Position_Next1[10] = 11
      • Set Moveable_Position_Next1[10] = 11
      • -------- Last Nr; Important to automattacly loop --------
      • Set Moveable_Positions_Last = 10
      • -------- Auto Generate and Remember the Center of the Movealbe Rect. --------
      • For each (Integer A) from 1 to Moveable_Positions_Last, do (Actions)
        • Schleifen - Aktionen
          • Set Moveable_Positions[(Integer A)] = (Center of Moveable_Rects[(Integer A)])
Find the Current Position of Personnage Rouge, if you don't want to save the current Position.

  • Personnage Rouge get current Pos
    • Ereignisse
    • Bedingungen
    • Aktionen
      • Set Loc = (Position of PersonnageRouge)
      • For each (Integer A) from 1 to Moveable_Positions_Last, do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Moveable_Rects[(Integer A)] contains Loc) Gleich True
            • Then - Actions
              • Set Person_Rouge_Current_Pos = (Integer A)
              • Custom script: call RemoveLocation(udg_Loc)
              • Skip remaining actions
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
      • Set Person_Rouge_Current_Pos = -1
Personage Rouge gain a Dice, I changed the Charges in Object Editor to easyli identify the rolled dice value.

  • Do Dice
    • Ereignisse
      • Unit - A unit gains
    • Bedingungen
      • (Triggering unit) Equal PersonnageRouge
    • Aktionen
      • For each (Integer A) from 1 to (Charges remaining in (Item being manipulated)), do (Actions)
        • Schleifen - Aktionen
          • Trigger - Run Personnage Rouge get current Pos <gen> (ignoring conditions)
          • Trigger - Run Move <gen> (ignoring conditions)
Next is the Move Trigger
  • Move
    • Events
    • Codntions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Moveable_Position_Next2[Person_Rouge_Current_Pos] Gleich 0
          • Moveable_Position_Next3[Person_Rouge_Current_Pos] Gleich 0
        • Then - Actions
          • -------- No Crossover --------
          • Unit - Order (Triggering unit) to Bewegen nach Moveable_Positions[Moveable_Position_Next1[Person_Rouge_Current_Pos]]
          • Set Person_Rouge_Current_Pos = Moveable_Position_Next1[Person_Rouge_Current_Pos]
        • Else - Actions
          • -------- Crossover Decision --------
          • -------- Unfinished --------
 

Attachments

  • Metaux's party version 0.1.w3x
    118 KB · Views: 29
Last edited:
Level 2
Joined
Jun 19, 2016
Messages
26
Hi, sorry for the long time, i also read your message when you post it, but didn't answer and worked on my map. Then now im a little bit on it.

I tried your trigger but the chaman still didn't move, so now since i'm not the autor of this trigger and i don't fully understand it, i don't know how to fix it properly. So could u give me some advie again ? ( i'll reply more faster this time )

Sorry and thanks !
 
What is your current Situation?

Edit: I talk about the map. Oh Sorry it can't work.
The Trigger Do Dice is wrong.
Correct is this
  • Do Dice
    • Events
      • Unit - A unit Gains an Item
    • Conditions
      • (Triggering unit) Equal PersonnageRouge
    • Actions
      • Trigger - Run Personnage Rouge get current Pos <gen> (ignoring conditions)
      • For each (Integer A) from 1 to (Charges remaining in (Item being manipulated)), do (Actions)
        • Schleifen - Aktionen
          • Trigger - Run Move <gen> (ignoring conditions)
 
Last edited:
Level 2
Joined
Jun 19, 2016
Messages
26
Well, i tried and it's still not working, but i think it's on the item, because i make it like " used when gain", but i don't think this work for the trigger.

The problem is that nothing is working, i don't know if it's the spell, the item, the trigger
 
Well my way to debug if something does not work. I do print out the current Trigger as chat message.
If it does not appear when it should as your predicted it, than you know where the problem lies.
  • Game - Display to (All players) the text: (Name of the current trigger)
Inser this in every Trigger or Group/Action case you want to know.
-> Try your Map.
 
Status
Not open for further replies.
Top