Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - redcoachstudios

Pages: 1 2 3 4
1
Ask a Question / Trying to create level pass variable
« on: May 15, 2018, 07:23:47 pm »
Hello community! I'm trying to give my game a pass level score, and have that trigger when two characters collide. The code below is what I have so far, but the level will not sense the score increase, and so does not show the "passed" state. Any and all help would be appreciated :)

2
Ask a Question / repeated sound
« on: May 02, 2018, 08:47:53 pm »
Hello all. I am trying to play a sound once after a level is passed but it seems to keep repeating. I've tried with a Boolean which did not work (as you can see below). I know that the sound works on its own but its when I put it in the extra code that it doesn't. Thanks for any and all help!

3
Ask a Question / Re: Stopping continuous collisions
« on: April 28, 2018, 07:58:04 am »
Well. It should work. Apparently collision doesn't occur or cancolide is always false.

You know how to use collisions and you know how to you use IF statements and attributes. That's all you need to make collision occur just once.  The way I showed above works. And makes code being executed only once at the continuous collision.

I also tried with custom event, but an error doesn't allow me to do that.

4
Ask a Question / Re: Stopping continuous collisions
« on: April 28, 2018, 07:54:52 am »
Well. It should work. Apparently collision doesn't occur or cancolide is always false.

You know how to use collisions and you know how to you use IF statements and attributes. That's all you need to make collision occur just once.  The way I showed above works. And makes code being executed only once at the continuous collision.

I think having the snappedamount=1 in the actor is not allowing the scene to recognize the code. Instead of the Boolean I tried just a straight up "If actors collide set snapped amount to snapped amount = 1" and nothing happened still.

5
Ask a Question / Re: Stopping continuous collisions
« on: April 28, 2018, 07:49:39 am »
make a boolean attribute and when collision takes place
if "boolean attribute"
set "boolean attribute" to false
do after ____ sec
set 'boolean attribute" to true

Could you clarify a bit? Is what you suggested here different from my code above?

6
Ask a Question / Re: Stopping continuous collisions
« on: April 27, 2018, 08:01:06 pm »
It would be just easier if you put code for increasing player score in just the behaviour of actor of type instead of a scene. You would have to copy all events across scenes if you keep doing it that way.

You can increase the score in the behaviour of the square whenever they snap with another. And to register it only once you can do this:
http://community.stencyl.com/index.php/topic,56181.0.html

Well. Actually you have already done somethings similar before

Like below right? It's not increasing score (level is not being passed)

7
Ask a Question / Stopping continuous collisions
« on: April 27, 2018, 04:24:09 pm »
Hello again community! My work is well underway and my game is almost 1/2 of the way finished! Another problem though. If I want stencyl to register collisions once, what should I do? For example when two actors of a group collide I want them to increase a score, when that score reaches a certain amount the level passed event triggers. What is currently happening (with the code below) is that once one group makes a collision, it is registering as multiple collisions and the event level done happens even though the player hasn't really made the score requirements.  Thanks ahead for any and all help!

:)

8
Ask a Question / Re: How to switch the animation of a group
« on: April 27, 2018, 08:49:19 am »
 :o I'm so sorry. I feel extremely unintelligent at the moment. It worked! I believe you've helped me before if I'm not mistaken, thank you so much. Without the help of you, and this community, my little game would be in the trenches.  :D

9
Ask a Question / Re: How to switch the animation of a group
« on: April 27, 2018, 05:18:01 am »
Please have a look at my second attachment. You can disable the behaviour, and then execute animation red



Thanks for the help, but I did this and it did not work. Could I be doing something wrong (as is what often happens lol). Again thank you for your time and effort in helping me!

10
Ask a Question / Re: How to switch the animation of a group
« on: April 26, 2018, 05:25:24 pm »
I think it's because the "switch animation" is overriden by this code

I think by disabling previous behaviour would fix that. Try it and check if it works

Yes! That did work...but I need both of those animations to happen...so how could I get passed this?

11
Ask a Question / How to switch the animation of a group
« on: April 26, 2018, 04:32:50 pm »
Hello community! :) I'm currently trying to switch an animation for any actor within a group when one of my levels is done. Below in the photo is what I'm currently trying to do, but it doesn't work (animation does not switch). I've also tried triggering an event which I then put in the actors of the group and that doesn't work either. In the code you can see where I've tried to do this with the "for each actor of group switch animation to red for actor of group". Any and all help is greatly appreciated!

12
After a long, three day battle with this mechanic  I've finally got it! I want to thank everyone who has tried/has helped me while I was pulling my hair out to this very simple task. Thank you all so much!!! Can't do it without this community man.

13
I'm going to take a guess at what is happening here.

Actor 1 detects collision with actor 2
Actor 1 changes animation
Actor 2 does not detect collision because new actor 1 animation doesn't collide with actor 2

If that is the case, what you could do is have each actor set the animation of itself as well as the colliding actor.

I think you're helping a lot. I implemented kind of what you said and for the most part it is working, however the squares don't both switch animations still. This is how I did it...could it be something else? Just say so if you need anymore information. Thank you so much for reaching out!!! :)

14
This is what my code looks like currently along with a screenshot of the scene. Just for any reference.

15
I tired implementing this, because I need the 1st and 2nd actors to trigger "snapped" for themselves only. If I set the entire group to snapped after two of the group members collide the puzzle will not work because then all actors in that group will react when i Only want the actors who collided to react. I tried to do this but it won't work either:


Pages: 1 2 3 4