Get a location sprite to take values from another sprite's variables. I think?

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hey there, I'm a complete beginner to construct (and game development in general). And I've been scratching my head on how I can achieve this mechanic..

    So I already have a few mechanics such as "add money" to "currency"

    aswell as "player move to spot" (move only to connected spots)

    But I'm trying make a system where if certain spot had variables matching 1 or equal. Add money to currency (this works) And only have it happen once. And only on a certain spot. But I can't figure out how I'm supposed to do this...

    (I feel like it should be very simple but I'm clueless.)

    (For reference)

    + PLAYER: On collision with FAM_SPOTS

    + System: FAM_SPOTS.locationNumber = TableIDs

    -> System: Set currentLocation to FAM_SPOTS.locationNumber

    ----+ FAM_CHAIRS: Is isOccupied

    -----> System: Set currentLocation to Table.TableID

    -----> Table: Set TableID to Table.SeatsOccupied

    -----> Table: Set SeatsOccupied to 1

    * On function 'Chairs occupied'

    ----+ System: For each FAM_CHAIRS

    -----> FAM_CHAIRS: Set isOccupied to False

    --------+ FAM_CHAIRS: Is overlapping FAM_CUSTOMERS

    ---------> FAM_CHAIRS: Set isOccupied to True

    ---------> FAM_CUSTOMERS: Set X to FAM_CHAIRS.X

    ---------> FAM_CUSTOMERS: Set Y to FAM_CHAIRS.Y

    ---------> FAM_CHAIRS: Set color to rgbEx(255, 0, 0)

    --------+ System: Every tick

    ---------> debugText: Set text to "Customer Inventory: " & FAM_CUSTOMERS.Inventory

    | Global number TableIDs2‎ = 0

    + System: Every tick

    -> (no actions)

    + FAM_CUSTOMERS: On DragDrop drop

    -> System: Set TableIDs2 to FAM_CHAIRS.isOccupied

    -> Functions: Call Chairs occupied

    -> Table: Add 1 to SeatsOccupied

    If anyone had an example or tips on how I should do this, it'll be much appreciated!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Difficult to work out what's going on without knowing the design or gameplay. An explanation of what happens in the game will help and also what you tried and where the problem is.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)