Buying Houses like in LOAP?

strembitsky

Member
Reaction score
1
I need someone to tell me how to make it so when a guy has 500 gold, he can go into a region near a house that will give him the house, (so he can open the door with a chat string) and take away 500 gold. I am going to have 6 houses in my map in total. I looked on the LOAP maps, but they are really hard to process through my brain. xD

Please help!:confused::confused:
 

Bogrim

y hello thar
Reaction score
154
So basically a unit enters a region and if the owner of the triggering unit has 500 gold, he gains ownership of the structure?

You should try experimenting more with the trigger editor - there's not much help to give here if you don't understand how the editor works in general.
 

strembitsky

Member
Reaction score
1
i know how it works, if that was the type of trigger i wanted, that you said, i would have done that easily. But in LOAP, buildings are actually terrain, with walls and stuff that you go inside of. All I want it to do, is once you buy it, you can use the trigger where you open the doors inside of the house.
 

KillingSpree

New Member
Reaction score
7
In LoaP they do it like this:

This is the trigger that let's you but the house:

Trigger:
  • buy house
    • Events
      • Unit - A unit enters Buy House 500 G <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Entering unit)) Current gold) Greater than or equal to 500
    • Actions
      • Player - Add -500 to (Owner of (Entering unit)) Current gold
      • Trigger - Add to open doors house 1 <gen> the event (Player - (Owner of (Entering unit)) types a chat message containing -open doors house 1 as An exact match)
      • Trigger - Add to close doors house 1 <gen> the event (Player - (Owner of (Entering unit)) types a chat message containing -close doors house 1 as An exact match)
      • Trigger - Turn off (This trigger)


And these are the open/close triggers:

Trigger:
  • open doors house 1
    • Events
    • Conditions
    • Actions
      • Destructible - Open Gate (Horizontal) 0000 <gen>

Trigger:
  • close doors house 1
    • Events
    • Conditions
    • Actions
      • Destructible - Close Gate (Horizontal) 0000 <gen>


Notice there aren't any events from the start of the map. If someone buys the house, the trigger adds an event to the open/close triggers.
So if Player 1 buys the house the open trigger would be like this in-game:

Trigger:
  • open doors house 1
    • Events
      • Player - Player 1 (Red) types a chat message containing -open doors house 1 as An exact match
    • Conditions
    • Actions
      • Destructible - Open Gate (Horizontal) 0000 <gen>


I hope I helped ;)
 
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