You forgot to give the 4 new food items the qualifier group.good (the big round apple).
That's all - I added that in and everything worked.
Printable View
You forgot to give the 4 new food items the qualifier group.good (the big round apple).
That's all - I added that in and everything worked.
@Janette5 ok its working now but watermelon still spawns even though i chose the pretzel.
On the frame you select the food
Watermelon = 6
Pretzel = 5
On the frame where you put the food into the level
Watermelon = 5
Pretzel = 6
So change 1 of them else they'll always be swapped.
@Janette5 ok so now for my last custom thing i want the player to choose their own color for the level. in the custom level frame in an object called "border" i put three animations for 3 of the colors as a test. how do i make it where the player chooses one color and it changes the color in the next frame? Attachment 29189
Attached.
The custom / selection level is exactly like the other two, except there's only 1 choice.
On the next level the border has 1 animation - stopped, that it defaults to. Every color is an animation frame that matches the selection on the color choice level. If you change a color on the color choice level then you must change the color of the border frames too. Keep in mind the animation frames start at 0 - so frame 0 = color choice 1; frame 1 = color choice 2 and so on. You'll see for the calculation I subtract 1 to match them.
(You can change the color using the fill tool inside Fusion - the one that looks like a tipped bucket - which is what I did, I just copied & pasted the frame from one to the next and used the fill tool to change the color.)
@Janette5 it got some of the colors wrong. like when i chose the gray color it came out lighter and when i chose the dark gray one it came out as black. is there like another way to do it to insure itll always be the right color?
That just means I chose a darker shade when I created them - you can fix that yourself - you can go into the border object and change them to be the exact same shades as the ones you chose for the color choices.
@Janette5 oh i didnt even notice that lol. ok its all fixed and everything has finally been put together. i have another question tho, so i have strings that have names of all the foods and on the first part of the frame i have cherries through the burger and when the click to the next portion it keeps the same names. how do i fix this? Attachment 29193
Just tick the block under Scrolling Options - Follow the Frame for the strings - that's all.
String - Runtime Options - Scrolling Options - Follow the Frame
@Janette5 for some reason the ready button is always visible and when i deselect a color it doesnt do anything. i think i messed with something by accident but i cant tell what. maybe cuz i resized everything but im not sure. Attachment 29197
The ready button:
Properties - Display Options - Visible at Start - That button must NOT be ticked. You've ticked it, so it will always display.
The border_arenas object:
Remove use fine detection. You need the bounding box so that when the user clicks in the middle of the box to select / deselect a color, it also triggers a click on the border_arenas object.
@Janette5 fixed. i have another question, how do i make the ghost fly over the alligator without changing much of the code? since the ghost can fly i want it to fly over the alligator, how would i do that? Attachment 29228
I changed your example to do this:
I have the alligators an additional qualifier that the ghost doesn't have - group.arms.
The baddies collision is now done with group.arms and not group.bad - which means the alligators will still collide with each other but not with the ghost.
You have 2 choices here - you can give all the other baddies that additional qualifier too, and the ghosts will never collide with them either.
Or you create this new code into a group that is active only when the alligator and ghost are chosen - if you need me to do this, you'd have to send me the full level with the global values and if you don't want to post it in the forums you can upload it to Dropbox or OneDrive and just send me a download link by pm.
@Janette5 what about using flags?
Using flags in what way?
The problem is that the alligators need to collide with each other but not with the ghosts. If I switch the collisions off - using a flag or value - the alligators don't collide with each other either. If I switch the collisions on then the alligators and the ghosts collide.
As long as the ghosts and alligators are in the same group and the collision events use that group i.e. group.bad - the collision events will trigger and they won't move over each other.
But you could wait a day or two and see if anyone else reading this will have a better idea.
@Janette5 ill probably start a new thread but i do have another question. how do i make it where the player goes into an options menu and if they want music or sound they can turn it off or on and itll save? i added different animations for when the person clicks/taps on the squares.
file: https://mega.nz/file/fhEXUCIC#OwmbDJ..._MaOmd0qP6J44g
the file was too big for the forum, sorry
I replaced your 2 tunes with small Fusion samples just to upload the file here. If you click on Data Elements and then change them out with your songs - it will automatically replace all the code bits and pieces with your songs.
On your level - everywhere that you had play a sample I replaced that with a global value.
Then on line 47 I inserted this:
* Hit Sound On = 1
+ Sound = 0
Special : Set Hit Sound On to 0Sound : Play sample hit_sound
What this does is test to see if sound is on (i.e. sound =0) and if so, it will play the sample once and reset the value so that the sample is not played again, until there's another reason to play it.
If sound is off (i.e. sound = 1) then it won't play the sample.
Note also that there's a setting in the game properties - play samples over frames (under runtime options - sound options). If you tick this then when they progress from one level to another, the music continues playing seamlessly. If you don't tick that, the tune will restart on each level.
Please change the file name in the ini file to a sensible name that will be unique to your game. (the name "ThisGameSaveFile")
@Janette5 when i turn off sound i can still hear it in the level frame. how do i turn it off?
Follow the pattern of line 41 + 47.
Everywhere you had inserted to play a sound - replace that with set a global value = 1.
And then set it to play once like I did in line 47.
I didn't change everything - just enough to give you a pattern so that you would know what to do in your actual game.
@Janette5 oh ok i see, but how do i loop a sample thats on a channel? do i just put under it play and loop sample?
Oh sorry, I see I accidentally set it up to only play once.
You do this:
* Music = 0
+ Folk dance 1 is not playingSound : Play sample Folk dance 1 on channel #1, 0 timesThe 0 times will loop it continuously.
@Janette5 oh ok thank you. so for my other levels, i have 12 levels in total with levels 1 - 3 playing the same song 4-6 playing a different one, 7-10 playing another and the last two playing a whole other. do i keep the same channel number the songs that are the same or change them in every level? also, will the ini also work on android? like, will it save the info if the player wants sound or not?
You can - in this case it doesn't matter. But what is important is that you stop the previous sample before starting the new one. If they're each on their own channel, you can just stop the channel. If they use the same channel - you need to stop the sample by name.
You would have this at the start of each frame:
* Start of FrameSound : Stop channel #1
or
* Start of FrameSound : Stop sample Folk dance 1
and then to play the next sample:
* Start of Frame
+ Music = 0
+ Drunken Sailor is not playingSound : Play sample Drunken Sailor on channel #2, 0 times
Yes, this works as is on Android as well.Quote:
also, will the ini also work on android? like, will it save the info if the player wants sound or not?
@Janette5 quick question, so im tryna have my game in full screen but dont know how to do it. i got the ufs object and messed around with it but havent really figured it out. how do i make it where i make the screen fit to any size on pc and mobile? and make sure everything is looking clean and not weirdly proportioned and stretched out?
file: https://mega.nz/file/vh1GSArQ#Du4wGA...NH2_lZAXZwF-Y8
Step 1 is to use a size that is equal to the majority of monitors.
Do NOT tick the button - maximized on boot-up - instead do this:
* Start of Frame
Ultimate Fullscreen : Go fullscreenThe settings I use under Properties - Windows are:
Style Ticked:
Heading
No Maximize Box
No Thick Frame
Full Screen Ticked:
Keep screen ratio
Options:
Resize display to fill window size
Anti-aliasing when resizing
You need to just play around with the settings until you get something you're happy with.
When you get the Android module there are different settings - it's becoming harder to make games work on all the different odd-shaped devices out there. I just use stretch to fill under the Android properties, it gives me the best results but you can check out the help file - they give you pictures of the different settings there. Stretch to fill will give you some distortion, but I write my games in a way that it looks like it was meant to be that way - i.e. on one device the circles will be ovals, on another they'll be circles and I'm okay with that.
If you upload a very large file then I can't change in your file without having to go and upload it somewhere else myself - I'm not going to do that all the time - maybe remove the music from your upload version?
@Janette5 sorry about that, i didnt know the music made the file big lol. but how do i restart a song after the player leaves the level? like after you finish or die in a level you'll go into another frame and the menu music starts where it left off instead of restarting from the beginning. i paused channel 1 when i went into the level and resumed it in frame 4. Attachment 29238
Pause will stop the song where it is and continue when you resume it.
If you want it start over you need to stop it and then play it again - I changed your example.
@Janette5 but what if i go back to that frame from the main menu? i know i dint add that in but in my game when the player loses or wins they'll be brought back the level selection screen and the music will start like in the title screen but not restart when going into different frames that play the same song. i hope im explaining this right
If you interrupt the music with a different tune - you may as well restart it - it's not like people will remember from one moment to the next that they're continuing or restarting a song.
The problem is at the point the player leaves the frame, you don't know what they're going to do next - and if you keep all the tracks running in memory i.e. paused - especially on Android - that's going to take some memory.
I'd recommend you just stop and start them as needed.
@Janette5 yeah ill probably just stick with that, but when i go into the level selection frame it just restarts the song that was previously playing in the title after following your example of starting the song when coming back the the level selection after finishing a level.
I changed it so it will play seamlessly across the levels - the one tune will only stop when the other starts. See if this works for you.
@Janette5 oh i meant the folk song in title screen. im tryna make it where the song doesnt restart everytime you get to a new frame, like when the title screen song plays and then you go into the level select screen it restarts. having it pause is the only way to make it start playing again without restarting, but if it takes memory then i dont think i should do that.
The way it's written the title song continues seamlessly into the options menu and then back again. If you follow that setup for your level select it won't restart each time.
In your game did you remember to tick the option "Play sounds over frames"?
@Janette5 yes, for me in my file when i return from the level back to the level select the title song doesnt play, even though it should
@Janette5 actually i figured out another way. instead of using channels i just played the sample and looped it and in the level selection i made a counter and set it to the song position and now it works.
@Janette5 i do have one more question tho, so in frame 1 theres a ready button and it only moves you to the loading screen when a level is selected, for some reason even if its invisible and you click on it the button still moves you to the loading screen. idk why it does this but ive been redoing the code to figure it out but cant. Attachment 29242
In the file you sent me now this button isn't ticked - if you don't tick it - the music doesn't continue across frames:
Attachment 29243
Fusion will execute a click on an invisible object - it's visual to us - but not to Fusion.
All you have to is insert the command + "ready" is visible:
* User clicks with left button on ready
+ ready is visible
+ Alterable Value A of ready = Alterable Value A( "ready" )
storyboard controls : Jump to frame "loading" (2)
@Janette5 thank you! oh and the reason the button isnt ticked is cuz this is a new example i made, the other one i already implemented in my game and it works now. but instead of stopping channels i just stop the sample. is there a reason it should be a channel instead?
No, it makes no difference whether you stop a sample or a channel.
The only reason I stop a channel is because I might play multiple samples on the channel, so stopping the channel prevents me having to stop the individual samples.
@Janette5 so the food in this particular level doesnt spawn. i checked and didnt see anything that could be causing it but im sure i overlooked it.Attachment 29251