lionz's Recent Forum Activity

  • You could have one function and conditions within the function based on a parameter. You pass a different number through the function each time and in the function the conditions look like if param=1 do this, if param=2 do this.

    If the functions are vastly different and a large number of events then you can call each function based on an instance variable of the object using similar conditions, if object.var=1 run function 1, if object.var=2 run function 2.

  • Technically you could have an array with the IDs in one column and the name of the object to create in the next column and then run a function to locate the ID position at X,0 in the array and use 'Create object by name' at X,1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not like you're describing, when you are in one layout it is like the others don't exist. You can go to the other layout and load data though. What you're describing is probably done with array data, you store collected items in there and load them in the wallet layout.

  • Yeah you posted at same time, as mentioned above you can use Persist behaviour which might be good for this type of game, or global variables.

  • When you return to layout 1 are you given the same options but the door is now open? You can give the 'Strange Door' button a variable which changes when the door is unlocked, if var=0 then go to layout 2, if var=1 then go to layout 3.

  • Yes you would go to the home layout, or you can create the thing you mentioned on a new layer in the current layout and make it visible.

  • It looks ok except you need to press twice to get to the next weapon the first time, you need to set weaponselect to 1 on start of layout when you spawn the first weapon.

  • I don't think it would work perfectly as it would skip 0 if you want that to run the first time, it would make the variable 1 then run the function. Depends what you want to happen in the game. You could of course change the conditions to 1, 2 and 3 instead of 0, 1 and 2 then it would run them all.

  • Add 1 to variable comes after the function so you should see it as 1 when it loops but never 0.

  • When you say it seems to not be working, how are you determining that, are you checking the variable in debug mode?

    Yes you can use an instance variable from the player as a parameter instead.

  • what's the problem?

  • Ok fair enough :)

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 73 followers

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies