Laurent's Recent Forum Activity

  • Oh ! I guess this is what i saw. Would you have an example ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I remember something where a layer is given the name of a layout so this layout can be part of another layout.

  • It's all in the title : I'd like to have a layout embed in my current layout.

    I know it's possible, I did find a way here back in the day but can't lay may hands on it again.

    Tagged:

  • You do not have permission to view this post

  • You're a genius !!!!

    I added a Trigger once condition and everything is fine now !

    Thank you !!

  • Hello,

    I tried your approach with the onTap code in a group being enabled when necessary. And it is still the same.

    I dont't understand why every action is working (destroy, variable changes value) but only layer visibility is not. Is there something special with this action that causes this ??

  • Your first 2 requirements get met state and isMoving and then you tell the system to wait 1 second. After 1 second did you touch the button as well as overlap an enemy as well as hex overlap player.

    Yes, every conditions are ok.

    The thing is that after "Touch button", every event occur (meaning Pick and Overlapping are also met) : Destroy enemy & Set occupied to 1. Only Set layer 2 invisible doesn't work.

  • Thnaks both of you, and thanks winstreak for taking the time for the clear video !

    I understand what's going on here. By the way, exemple here was not very well chosen because my real problem doesn't involve the possibility to use the Else statement.

    I can't post the all code but here is the segment that poses problems :

    In here, everything works well when the highlighted line is not present (wait 1 sec) : Layer 2 is shown on screen (Red button and Fight text are on this layer) and when button is clicked, layer 2 is set to invisible and State is changed to its correct value.

    But when action "System > wait 1 sec" is added, everything works the same but "system > set layer 2 invisible" is not triggered.

    What happens here ??? I really don't get it.

  • I came across a strange behaviour here. In this little code where everything looks fine, clicking the green button doesn't switch layer 0 where Red square is, as it should. Button is active because because it triggers correctly Flash behaviour.

    Did I miss something ??

    https://www.dropbox.com/s/nf1lm16l1e5w3ah/SetLayerInvisible.c3p?dl=0

  • Hi R0J0hound

    I think you'l be proud of me.

    I managed to set up an Attack routine that looks pretty well.

    Here's how it runs :

    - When Player and an enemy are in the same hex (ie that hex occupied = 2), game state is set to "attack"

    - a layer is displayed. So far, it is just a button but it is meant to have a battle routine with action choice for Player (use weapon, use spell). Here, when button is clicked, Enemy is destroyed, ie Player wins.

    - Then two things can happen :

    1. Player still has move points left, game resumes to map where reachable hexes are displayed ("show moves" state) --
    2. Player has no move points left (meaning has attacker in the last hex it has been able to reach OR attack has occurred after an Enemy move) then game resumes to Enemies actions ("move enemy" state).

    Since you can't read C3 files, here's a screencap of the commented code :

    Still a lot to do but all this is on the right tracks.

  • Thanks !

    I'll have a look

  • Looks nice. How do you use it ? I could find no example file or tutorial

Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies