PhoenixNightly's Recent Forum Activity

  • First view this to see what the results would be-https://dl.dropboxusercontent.com/u/128026415/SoundTest/index.html

    Move with the arrow keys

    **Note disregard the toggle button doesn't function***

    WHAT IS HAPPENING?

    What I did was setup a soundRange that follows the player where ever they go and each level triggers the sound for that object. Green for low level sound Yellow for Mid level sound and Red for full sound. (Which you can see in the top image below)

    IMPLEMENTATION

    Now for the soundLevels I set a instance variable called soundRange to tell what level to play the sound at. for the object 'Fire' it has two variable instance 'soundFile'-for the audio file that needs to be played and 'inRange'-which is triggered when they enter the Green Zone. When object exits it zeros it out and stops the tagged sound.

    I did it this way cause I notice from your profile you don't have a license. So look at how my events is setup below and try to implement it yourself. Also I did test it on my android in Cocoonjs and it did work for me.

    But if you have more items for sound depending on range a license would be beneficial because you can use Families. Which is nice cause you can declare the instance variable in that and it would be transferred to whatever objects is in the family and you can set each object as you please.

    With Families it would look like this::

    So any object in soundItems would be tested.

    **UPDATE**Just pin each range to the playerSprite is better.

  • First thing first set this up in your project first and we will take baby steps to what your trying to get to.

  • ?? The set motion angle goes by whatever angle you need it to go and give it. So you would have to calculate the angle you need by calculating the position of the player.

    Sorry not at my computer on campus. But to illustrate how the set bullet motion angles work. Kinda...[attachment=0:3oeo2xy9][/attachment:3oeo2xy9]

  • serge Low

    Once I finish some school reports I have to write up I will help you out.

  • Yes that would work also 270 for clockwise -90 for counter clockwise.

  • Is the properties editor of the bullet behavior do you have angle set to 'No'? Then set an event to flip the image. With angle set to yes it will rotate the sprite however many degrees the bullet is set to. So if you set the bullet motion angle to 180 it will rotate the sprite 180.

  • Problem Description

    I left my project open had other things to do so the computer went to sleep. I notice if the computer stays asleep for too long( for me 40+min) that when I come back to the project it would not run as it did before I left it. Instead it would error saying objects didn't exist.

    What I observe is that I was gone for 40+min but the program auto-saved while the computer was asleep so it corrupted the autosave. Sooo when I load the original file it had nothing that I recently did it only had what I had done from the time I did manually save. I know this because I left about 4:00 pm and just came back now about 4:40 but when I look at the autosave it was update at 4:29 pm when the machine was asleep. Shouldn't it wait until the computer is awake to autosave again??

    **Also the size of the autosave once it save is 5.5kb and the orignal file is is 222kb. And from what I have studied the autosave is the whole project packaged up so should be bigger then the project save single file.

    Operating System and Service Pack

    Windows 7 64-bit SP1

    Construct 2 Version ID

    Release 163

  • Disable those two lines. Okay ,You can't set the motion till the instance is created. So where you have it spawn you have to then set the angle of motion right after to 270 and it should work.

    So for when creating a new instance of an object you have to set the motion after it is created (even though you declare it early on it doesn't transfer with the instance that is created afterwards). During startup is only good for when the instance already exist like a background or something.

  • Did you make the changes?? Can you post so we can see?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But I don't see no where in your event sheet that you set the bullet angle. Which should be done on the start of layout. You can't set it in the bullet behavior properties that Angle property only take Yes or No. Set to no if you don't want it to rotate the sprite with the angle it is going. But you have to event code the bullet angle.

    **Also why do you have it call Start of Layout Twice?? Those two events can be combined under one Start of Layout call. Also me personally always have the Start of Layout at the top. So that it is the absolute first thing done.

  • Since you can't upload you capx cause its too big can you take a snapshot of your eventsheet so we can see what is going on.

  • Did you try changing the angle of motion?? Cause by default the angle is 0. So try setting the angle to 90. Like on start of layout have it set the bullet angle of motion to 90 or -90.

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