lionz's Forum Posts

  • You do not have permission to view this post

  • It's what I described above, you are setting the variable to 1 or 2 instantly, not 100. So then you can click on the background again with the variable set to 1 or 2 which triggers those conditions. You should use a different variable for locking out clicks, not the same variable that you are changing for the questions - this will be an additional condition, so QuestionActive=? and also CanClick=? which you toggle on and off.

  • Guessing you mean the question active variable, when you tap and set it from 0 to 1 it means within the same tap the next event can run because you made it true by setting it to 1. Not sure of the reason for the variable but that's probably why it lets you click the next panel. Consider using a general lock out variable that swaps only between 2 values to lock out the tapping.

  • I'll give a general idea as it's a lot of code but you should store the active spell name or some kind of global var so you know you have something equipped, you may already have this then ok. When you select an active spell, if there already is one, you need logic to delete the old one unless adding the new one does this already, then having stored the name of the old active spell you can run the loot pick up function on it as though you are picking it up again so it will add to inventory - or clone the inventory item pick up function with aspects of it you want to keep and call it a spell swap function.

  • The issue as I understood it is that he clicks to create a tower then the second event also rotates the tower once as it is created which he doesn't want. The solution I gave is to create a stamped variable so only when it is created and stamped then it can be rotated i.e. not on the click where you spawn the tower, but on future clicks.

    The mouse button release also works because if you click to create a tower, it can't be rotated until you click a second time which is another solution to that problem. Family though cannot work for the reasons I mentioned, the black square is not a tower and it affects future events much like if you added the player to an enemies family.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is where you use a Family, put all 3 objects into a Family and put the instance variable as a Family instance variable. Then you can say if Family.var=2 find path to Family.

  • Hmm and this fade object works in other layout ? Check in debug view that there is an instance of that object in the second layout. You may have to share link to the project file to get more help.

  • Add other unrelated events see if it runs them like setting a global variable value. If not then it's problem with the event sheet set up.

  • If the event sheets are hooked up correctly then there's not enough info in the post. What specific events are not working ? What is the event that you mentioned is working ?

  • Give the circle objects the 'Persist' behaviour

  • It would be an instance variable at the family level, also called a family instance variable, so on the family object Towers you can add an instance variable 'stamped' for example. Then in a general event (order doesn't matter), you can add 'on mouse click release' and 'Towers.stamped=0', set Towers.stamped to 1 (0 is default).

    Another way to do the same functionality without using mouse click is to have an event 'Family Towers on created' - wait 0.1 seconds, set Towers.stamped to 1.

    Then returning to your original event for rotating, you add a condition 'Towers.stamped=1', means it won't be rotated at the same time it is created but on second click it is possible. You can then remove the black square from the family also.

  • I don't think adding Obstacle to the Family 'Towers' is the best fix because it's not a tower. When you want to apply other events in future to 'all towers' it will apply it to Obstacle as well which is the black empty square, you don't really want this. A Family should contain only related object types.

    example : you want to destroy all Towers to refresh the game, so you use destroy Family'Towers' it will destroy all the black squares too.

    The reason you are having the problem is because it creates the object on a click, then immediately runs the next event which is to rotate on click. A better fix would be to lock out the rotate event on towers that were recently created, perhaps with a 'state' variable. When you release mouse click you can set the variable to allow the tower to be rotated.

  • You do not have permission to view this post

  • Nothing you've shared works for me. But check it yourself in debug mode if this red hand and the fog are on the correct layer.

  • Do you mean you are expecting to return to it and it should be empty ?