@Janette5 yeah i made him a bit faster and lowered the random range. but i do still see him walking away, so i might push his creation spot back a bit
Printable View
@Janette5 yeah i made him a bit faster and lowered the random range. but i do still see him walking away, so i might push his creation spot back a bit
I'd split it - when you have 2 alligator's coming in from the left - create the one at random range 0 to 190 and the other at random range 240 to 480 and that way they won't overlap.
@Janette5 yeah he doesnt walk away now, hopefully itll stay like that lol. but he does do it with other badguys that spawn from the left (mostly on the left). like, if you choose alligator and mantis ive seen it happen with them. i did put the new random range on the other alligator spawn (RRandom 240, 480) but it doesnt do the same as the one with just the alligator.
There's always going to be problems if the player chooses two baddies that come from the top / bottom or two baddies that come from left and right. Unless you customise your game for every possible combination. Else keep it as a feature and work around it. Keep in mind they do turn around and come back in - so that does add some fun / challenge to the game when that happens.
The Alligator being created between 240 and 480 is only effective if the other baddie that is also entering from the left and right is created between 0 and 240. Else it really doesn't do much.
@Janette5 so do you suggest i make it where all the baddies that come from left and right 240, 480? because ive never seen the problem with the ones that come from top and bottom.
You will mostly only have problems with the very large characters like the Clown and the Alligator. The Alligator because it's so long has the most collisions. So perhaps, like the Robot, you want to give the Alligator it's own group and customize that group for those coming in from the left and right like the Alligator - either by giving each one their own half of the screen or giving each one their own direction. (Or you could make those large characters a bit smaller.)
@Janette5 ok yeah, so i did make him smaller, i also made him a bit faster and it seems to work but how would i make it where when he's chosen then either first or second the other badguy doesnt get created in the same area as him? i did try doing the same thing with the robot and scarecrow but havent seen it work. it only works with those two, or maybe im doing it wrong. Attachment 29124
You were changing your main group - you need to create a new group - make the changes there and activate when necessary. I've done the following:
Changed your code in the Start of Frame Events to activate the groups as needed. Then created groups as follows:
1. Enemies - they will come in top / bottom / left and right across the whole screen
X axis 0 - 800 as long as your frame is.
Y axis 0 - 480 (or you had it 30 - 480) as tall as your frame is.
2. Alligator & Clown
I didn't change anything here
3. Alligator & Other Enemies excluding the Robot and Scarecrow
Enemies will come in from the top / bottom
Enemies from the left and right will come in at the top of the screen
Alligator from the left and right will come in at the bottom of the screen
4. Robot and Enemies
The Enemies from the top / bottom will only come in on the right-hand side of the screen.
The other Enemies will only come in from the right.
You'll have to amend the timing on these.
5. Scarecrow and Enemies
The Enemies from the top / bottom will only come in on the left-hand side of the screen.
The other Enemies will only come in from the left.
You'll have to amend the timing on these.
If you right click on a group and then click on edit - you'll see there's a button I ticked off - active when frame starts.
This means you don't ever have to deactivate those groups - they automatically are - you only need to activate them when you use them.
But please check this - I was just quickly doing it - I just checked one or two myself.
@Janette5 it all works good. but is there a way where i can have the alligator spawn on one side and the other baddie on the another? same like the robot and scarecrow, unless you already put it in the example and i accidentally looked passed it
What I created was for the Alligator to spawn from the left and right at the bottom of the screen and the other baddies that enter the screen from the left and right to spot at the top of the screen. You can change this to any other pattern that you want. A quick way of doing it would be to delete all the enemies that spawn from the left or right in the Alligator & Other Enemies group and then copy those enemies from the Robot group - where all the enemies come from the right - and paste that under the Alligator and Enemies group. Then set the Alligator in that group to spawn anywhere from Y - 0 to 480 and the enemies will all spawn from the right.
@Janette5 alright so i fixed up everything and it seems to all work! but sometimes the baddies collide with each other causing them to slow down a bit giving the player an advantage to shoot them. how do i make them not do that? Attachment 29128
As a start delete line 265 because that line is in conflict with what is happening in lines 249 - 257 and it will be executed ahead of those lines as it's an immediate condition.
It does improve the situation, but doesn't solve it. I don't think you'd be able to completely solve it without allowing the baddies to freely move across each other. Every extra bit we add to solve one problem - just creates another problem down the line.
@Janette5 yeah its working a bit better now lol. i think it should be fine. everything feels better and ill go and try to fix everything else up. but for the robot and scarecrow, when the player choose either or how would i make the other baddies spawn in their earlier points? like, the snakes earliest time to spawn is in 8 secs, if the player chooses the robot then it will only spawn the the one on the right which is 10 secs. do i do the same like the alligator and enemies making an individual group for all characters or is there another way of doing it?
If you go back to one of my examples I had put the scarecrow and robot in their own groups and it would be simple then to just change the timing on each other baddie to make them enter faster or slower. It's the one dated 29 July.
Edit: I also gave you a different example a few days ago about using a global value to calculate the time (instead of every 8 seconds) to determine when the baddies are created - and in that case you could change the global values at the start of the frame depending on which baddies were chosen.
@Janette5 i found a glitch in Frame 1, so i was testing out the enemies that go with the robot when i changed my character and it for some reason thought i was still selecting them which caused double spawning in Frame 2. heres how to get that glitch: select the snake first, then click on the right button, then click on the left, then deselect the snake and click the right button to select the robot, once selected click the left button again to select the snake again (it should not let you the first time but click on the snake again), then click the ready button. you should then see no robot but two snakes coming out both sides. Attachment 29142
I changed it and commented in the .mfa
Basically it was a scenario I hadn't provided for - to cancel the first choice before selecting the second choice.
I've changed the code a bit to set the selections to zero when they're cancelled, so Fusion doesn't remember the value.
@Janette5 thank you! but i have a question about one of my levels. so the grim reaper has his scythe on his right hand and it when the player collides with him he doesnt fully touch him but loses a life because of his detection area. i did check the use fine collision but that just made it worse because he just glitched through the player. Attachment 29146
I'm not sure what you're asking.
You need to set use fine detection on for the Grim Reaper.
If Fine detection is on - ticked then the player won't trigger a collision until he touches the grim reaper.
If fine detection is off - not ticked - then the player will trigger a collision when he is underneath the scythe as Fusion draws a box around the grim reaper and when the player enters the box - there's a collision.
The scythe will move through the player, but you have no code to block that because the scythe isn't part of group.bad
@Janette5 thats the thing, when fusion makes the box the player collides with it but the player doesnt actually collide with the reaper, instead just with the invisible box. and when the detection is on then he just goes through the player. the scythe is supposed the do its own thing. but what i was asking is how do i make it where the player collides with the grim reaper instead of its detection box and without glitching through him.
So the block - use fine detection - must be ticked on the Grim Reaper.
Then line 2 of your code - Always Event - delete the two lines that tell the Skeleton and Grim Reaper to always look at the player - because those 2 events will allow the skeleton and player to move onto each other. (It's already handled correctly on line 49 - under the Enemies.)
By the way you have 2 grim reapers - one on layer 1 and one on layer 2. That doesn't matter because you don't create them at start and when you create them they are both created on layer 2. Unless the bit you sent me is different from what you're doing. Since the player is on layer 2, any grim reaper on layer 1 will not affect him.
Also line 57 is wrong - it must be:
* Alterable Value A of Group.Bad = 0
Group.Bad : Set Flag 0 off
(You have there - set Flag 0 ON)
@Janette5 the line 2 makes it where the enemies are always locked on target. if i just rely on line 49 then they'll move into the arena but not toward the player causing them to just walk away since they have no one to move towards. and the two grim reapers and skeleton shouldnt be there, idk how that happened but you can just delete the extras that on the left.
Line 49 didn't work because line 57 was wrong - if you fix that - then line 49 reverses them and line 57 after a count of 100 allows them to turn around and target the player again.
Second thing I saw is that you have if the baddie collides with the player for the baddie to bounce. Now the baddie can bounce in any direction including onto the player - so that does every now and again create a glitch as you saw it. I think I did at some stage write a bit of code where the player could push the baddie out of the way - but I'm not sure what you decided to do there. But as it's written - you will every now again have the baddie bounce onto the player.
@Janette5 how would i push them away?
In this thread: https://community.clickteam.com/threads/107618-enemies-glitching-through-each-other
An upload I made - Application 6 - we had done that.
@Janette5 ah ok. i do have another question. so when the player runs toward one of the spike walls and shoots at it the player gets stuck and moves with the spike wall, i know we've already talked about it but i just noticed it happening again. its not as noticeable as before but i feel like its a disadvantage to the player. if you run against one of the walls and start shooting let go of yur controls and youll see the player gets stuck on the wall. and also, how do i make the fireball stay within the center? i see that sometimes it spawns at the very top and bottom, i played around with the random range but it still does it. Attachment 29151
Fixed - attached - I think it works but I don't stay alive long enough to fully test your game - it's good that you do :-)
Fireball:
You had an extra Fireball in the corner of the frame on layer 1 and you had the box ticked - create at start - so it was creating itself in the corner of the frame at the start of frame - as was the other one - higher up on layer 2.
I removed the extra Fireball and ticked off create at start.
Your random range was 50 to 250 or something like that - your frame starts 0 at the top and ends 480 at the bottom (because you've only made it that size). For the Fireball to be in the middle your Y would have to be at about 240 + - perhaps 50 pixels on either side - so I changed that to 190 - 290 so that it's in the middle.
I also put in a line of code to automatically destroy the fireball when it was moving away from the frame and was a distance out the frame. It's not good to leave objects floating around for no good reason, Fusion must still process them even though they're off-screen.
Spike Walls:
How it was written was that it required the player to move to break the connection, and if the player didn't move then the overlapping event would continue to trigger - which is what you saw, the player would move with the wall unless he moved away. What I did now is wrote in 2 lines that breaks the connection when the walls are retreating by moving the player 3 pixels away from the wall so that the collision or overlapping event is automatically broken in case the player doesn't move. You can see this on lines 80 + 86.
@Janette5 thank you! now the main side of the game is finally finished, but sorry for keep bothering you with all my questions lol i just need to know one more thing, so i want the the player to be able to choose their own food. how would i do that? it works a bit different than selecting a character i have two objects in frame 2 called food1 and food2, they both have the same food choices. how do i make the specific one appear in game? Attachment 29156
Don't worry - it's fun for me - I like logic puzzles and helping people solve problems in the gallery is like playing a logic puzzle to me. Also it helps me not forget how to program Fusion since I'm not currently doing much with it.
I made an example where the player can select two food and they will appear in frame 2. I did it using qualifiers - group.good and so it isn't necessary to repeat the commands in frame 3, as they are the same. Since all the pictures in frame 3 for the food are the same, it was difficult for me to test - so once you change them, please test this and let me know if you pick up any problems.Quote:
i have two objects in frame 2 called food1 and food2, they both have the same food choices. how do i make the specific one appear in game?
(In doing so, I also picked up a mistake in frame 1 - line 3 - and fixed that. )
@Janette5 i actually put the other foods as different animations in both fruit 1 and 2 (sorry for not clarifying that). i just tested it and only the first fruit i chose was created.
How many fruit will the player choose?
Do you want just one fruit object and then change the animation based on which fruit the player chose?
@Janette5 player can only choose 2 different fruits just like the enemies. honestly whatever is the easiest way for them to get created. ive seen people using one object and having multiple animations that change, but the only reason why i dont think that would work is because of time differences. the first fruit gets created in 7 seconds, and the other in 9 seconds.
Updated -
Fruit 3 and 4 were not created because there was an extra space in their name - I've deleted the extra space.
Fruit 2 was created but not visible because the animation frame was not set.
I've put the animation for all the fruit in the Stopped animation - that way you never have to set the animation because Fusion will always use that one if there's nothing else.
@Janette5 oh ok yeah its working now. but what do i do with the particles? each fruit has their own color and how do i make it where if the user choose a banana and orange that the yellow particle and orange ones get created when one of the fruits is destroyed? (i havent put the banana and strawberry particles in the custom arena yet but they are in the main game)
I have inserted an alterable value into each fruit that specifies its colour.
I've created the particles in the same way as the fruit - using a calculation to look up the colour and then selecting the particle based on that. (The particles belong to group particles.)
To simplify things - I made all your collision events run the same loop - the loop creates the particles in all directions and when it's done it destroys the fruit.
@Janette5 ok so i tried that out and i havent really gotten any results. idk if i did it right or maybe i missed something but it didnt do anything when i put it in my file. Attachment 29170
1. Your particle / pixel colors must match your fruit colors - currently you have them in a different sequence - if Food1 is Cherry - then food_pixel1 must be the color for the Cherry.
2. Food2 - your orange doesn't have a value in its alterable value for color - insert that. (Type 2 next to color)
3. Delete lines 582 to 591 - this will block the particles or destroy them so that you don't have the effect of the particles going in all directions.
4. Delete line 608
5. Line 613 - move the command - add 4 to destroy angle to the end of the sequence.
Then it works by me.
@Janette5 just tried it and it didnt do anything for me. Attachment 29174
You have a different name - just change line 602 to your name:
* On loop "Destroy Sequence"
+ Group.Good: Flag 0 is on
New Objects : Create "food_pixel" + Str$(Color( "Group.Good" )) at (0,0) from Group.Good
Group.Neutral : Set direction to Destroy Angle
Group.Neutral : Set speed to 65
Special : Add 4 to Destroy Angle
@Janette5 ok so i just ran into a problem. when you select the pretzel and banana from frame 2 the the watermelon gets created instead of the pretzel. and if you select the fries and the burger none get created. not sure whats wrong because i went and checked everything and it looked fine. also, i didnt delete lines 582 - 591 because when the pixels collide with something they need to get destroyed, and i didnt delete 608 because the food needs to get destroyed when times up or its just going to clutter the screen. Attachment 29175