LoaP Open Doors

Visedek

New Member
Reaction score
0
Hello,
Im making a Life of a Peasent and i'm trying to make a job in it. I have it so when i walk onto a Circle of Power (Police Job) it gives me the control of it. But im having trouble with opening doors. THis is what i have...

To get police job
Event
Unit - A Unit enters Become Police <gen>

Condition
((Triggering Unit) is a Hero) Equal To True
(Owner of Police Job 0019 <gen>) Equal to Player 12 (Brown)

Event
Unit - Change ownership of Police Job 0019 <gen> to (Owner of (Triggering Unit)) and Change colour

That Works fine

But then when I have the Open HQ command it does not open the force wall...

Events
Player - (owner of Police Job 0019 <gen>) types a message containing -open HQ as an exact match
Conditions

Actions
Destructible -Open Force Wall 0000 <gen>

Please Help!!!!!
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Events cannot use variables. That event will only detect the original owner, not the new owner when the Circle changes owners. Try this (Freehanded)
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -open HQ as An exact match
      • Player - Player 2 (Blue) types a chat message containing -open HQ as An exact match
      • Player - Player 3 (Teal) types a chat message containing -open HQ as An exact match
      • ---Etc, for how many ever players there will be---
    • Conditions
      • (Triggering player) Equal to (Owner of (Police Job 0019 &lt;gen&gt; ))
    • Actions
      • Destructible -Open Force Wall 0000 &lt;gen&gt;

There should be a player comparison something like that, but don't have WE open to check.

EDIT: Went into WE and made the trigger as it would actually work, no longer freehand
 

Visedek

New Member
Reaction score
0
That doesn't work either...
any other ways?


Also...


Completely off Topic but how do you write the Trigger like that without WE?
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Completely off Topic but how do you write the Trigger like that without WE?

Right click on the trigger name, select "Copy As Text", paste in here, select the full text of the trigger, click the
wc3tag.gif
icon above the text box that you type your post in. Or, if you prefer, just manually put [noparse]
Trigger:
[/noparse] tags around the full text of the trigger.
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
This works for me in a test map. It should work fine for you with the unit and gate changed changed...
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -open HQ as An exact match
      • Player - Player 2 (Blue) types a chat message containing -open HQ as An exact match
      • Player - Player 3 (Teal) types a chat message containing -open HQ as An exact match
    • Conditions
      • (Triggering player) Equal to (Owner of Farm 0000 &lt;gen&gt;)
    • Actions
      • Destructible - Open Demonic Gate (Diagonal 1) 0000 &lt;gen&gt;


Edit: Missed your second post. Glad it works.
 

Visedek

New Member
Reaction score
0
Does anyone know a way to do this but without having to tyoe it or copy and pasting
Trigger:
  • Open HQ
    • Events
      • Player - Player 1 (Red) types a chat message containing -open HQ as An exact match
      • Player - Player 2 (Blue) types a chat message containing -open HQ as An exact match
      • Player - Player 3 (Teal) types a chat message containing -open HQ as An exact match
      • Player - Player 4 (Purple) types a chat message containing -open HQ as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -open HQ as An exact match
      • Player - Player 6 (Orange) types a chat message containing -open HQ as An exact match
      • Player - Player 7 (Green) types a chat message containing -open HQ as An exact match
      • Player - Player 8 (Pink) types a chat message containing -open HQ as An exact match
      • Player - Player 9 (Gray) types a chat message containing -open HQ as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -open HQ as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -open HQ as An exact match
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Trigger &lt;gen&gt; the event (Player - (Picked player) types a chat message containing &lt;Whatever&gt; as An exact match)


Then just don't put an event into Trigger <gen>, this trigger will add the events to that one.
 

tmow

New Member
Reaction score
7
Hmm cant you have a variable for the police for example...when someone takes that job set a variable for them first, then when player owner of unit (Variable) types a message containing -open hq.

action open destructible
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
>Hmm cant you have a variable for the police for example
...
Quoting myself is bad, but...
trb92 said:
Events cannot use variables. That event will only detect the original owner, not the new owner when the Circle changes owners. Try this (Freehanded)
 

Visedek

New Member
Reaction score
0
Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Trigger &lt;gen&gt; the event (Player - (Picked player) types a chat message containing &lt;Whatever&gt; as An exact match)


Then just don't put an event into Trigger <gen>, this trigger will add the events to that one.

I really dont understand...
 
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