PhoenixNightly's Recent Forum Activity

  • Here an example of what i evented togther running-

    Detecting Occupancy

    HERE IS THE EVENT SETUP

    Setting the boolean instance variable for checking--

    In the event sheet a while loop was created to look until a spawner instance variable for occupy was 'false' and once it placed something there is switched it to say something was there. When the object destroyed itself it re-selected the spawner that created it cause it was overlapping and change the Boolean for occupy variable back to 'false'.

    I can only assume that this is what you want couldn't open you capx... guess you have the beta version installed. But if so you can look over this.

    A few areas can be fixed for redundancy but 'Families' would make it more cleaner.

  • This was a great question with fantastic answers!! When I saw the dummy layout option I was like 'DUUUUH' something so much better. Will add it to my development practice!!

  • I added ChartBoost. Not Admob...yet. The only thing I see when I run my app in CocoonJS Launcher is that I messed up on the ad refresh. But it shows a Banner ad.

  • Yes you need premium I will test it out. I just got approved.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the 'else' so it don't have to process unnecessary tests. So if the frame =0 it won't execute the other comparisons and skip over them.

    Might have to use the 'for each' loop

  • It would be

    "The variable is: "&varX

  • Can't answer that at the moment cause I haven't done it. but I am planning to package something soon and have been trying to see if I can integrate Amazon or Chartboost which would probably require me to go through eclipse to do.

  • Updated the events a little more. This uses 'Families' so I don't have to setup the same event for each object that has sound. Also make it that when a object triggers the sound to make it so that another object that may have the same file to make each object sound tag unique I used their UID in the naming of the sound.

    You can see the changes here-http://bit.ly/1fOoXrp

    Use the arrow keys to move the purple box.

    ::SCENE LAYOUT::

    ::EVENT CHANGES::

    If you don't have a license for every object that you wanted to do something like this you would have to set up the event individually or use frames...but then code each soundfile for each frame. Which does become unreadable to an extent and make a higher possibility of errors.

  • Make an event for object playercar and it will say is 'boolean instance set' this will return true or false so create an else for this event in case its not set

  • What you do first is check if the carPlayer isDriven is set to true of false. Then execute the keys function you need.

    So

    carPlayer isDriving=True then key do this

    else key do that.

  • Sorry for the late post took a moment to type everything up ::

    What you can do is have two objects PlayerCar and Player. For the PlayerCar object you can have a variable boolean instance called 'isDriving' if you player starts out outside of the car then you can set that to 'FALSE' by default. Then if you are using the 8 Direction for control give the car that behavior but again if the Player starts outside of the car set it to 'DISABLED'. Now on you player object create the 8 direction and Pin behavior.

    Now in the event sheet you can have when the player is overlapping the PlayerCar and hit whatever key it is to enter the car set the action to 1) Hide the player 2) Pin player to the car 3) set its 8 direction behavior to 'DISABLED' 4)set the car isDriving to 'True' 5)enable 8 Direction. So now where ever the car move to the Player object would follow invisibly.

    When they exit the car 1)set car to isDriving 'False' 2)Disable PlayerCar 8 Direction 3) set Player Visible 4)Unpin Player from PlayerCar 5)Set Player 8Direction to 'ENABLED'.

    Is another way of doing it. The isDriving boolean can be used in case certain keys match when the player is on foot. So the key would know which to do depending on if isDriving is set to true.

  • Sorry for the late response back. But there is a event that compare the frame of the object and only the instance(s) that it is true for would trigger the event. So if you did:: Lets say you sprite name is 'Puzzle'.

    If you set a event that says Puzzle compare animation frame=1 then any puzzle instance who frame is one would enter this event and run whatever actions you need.

PhoenixNightly's avatar

PhoenixNightly

Member since 10 Feb, 2014

None one is following PhoenixNightly yet!

Trophy Case

  • 10-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies