[Behavior] moveto

Post your completed addons to share with the community

Post » Sun Oct 25, 2015 10:08 pm

@rexrainbow
Thanks for these awesome plugins. Up to now, MoveTo is the best solution I found for making my character move on the world map, used in pair with PushOutSolids.

However, I still get strange behavior in certain situation, and I thought that I could show you what it is in case you would like to update the behavior.

Here is an animated gif of the problem :
http://giphy.com/gifs/3o85xFKfz2HmfuBMCQ

I think the problem is clear but to explain it further, I just click once just before the character starts walking. At first he goes to the point I clicked... Until he colides with a solid. At that moment he suddenly starts walking around the solid but in the wrong direction (top instead of bottom). I encounter this problem very often, and I'm afraid I won't be able to use your behavior if I cant' find a way around that problem...

To make things even more clear, here is the same situation with solids visible and colored :
http://giphy.com/gifs/3oEduGqATSWgHh1JHW

Is there a way to avoid this problem and to make him move nicely in the correct direction?
Thanks!
Image
B
14
S
4
G
1
Posts: 268
Reputation: 1,794

Post » Sun Oct 25, 2015 10:44 pm

@Rable
The issue is with the "push out solids" behavior. Well, it's to do with what's builtin to C2 since the behavior does the same thing as the "push out" action of the custom movement behavior.

I've always just opted to implement the push out myself. Here's one example:
how-do-i-make-the-8-direction-behavior-span-class-posthilit-slide-s_p904925?#p904925
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Oct 26, 2015 10:22 am

[Discussion is getting a bit out of the Moveto Behavior's scope. If that's a problem I'll post this thread in another place]

@R0J0hound
Wow, this seem to be just what I need! I implemented your code in the game's code, but up to now I didn't manage to get the same result as in your capx... I don't understand very much what's happening, but deleting the "solid" and "pushOutSolid" behaviors and replacing them with your code (updating the player and wall objects with mine, of course) let the player pass through the walls.
I tried to change the 16 value that you suggested to change, it behaves differently but not really better, being stopped by the walls but "jumping" from one palce to another.

Any idea of what's happening? Any advice on how to implement your clever code into my game's code?
Here is the capx of this part of the game :
https://www.dropbox.com/sh/j9hoth2oty56 ... tKYWa?dl=0
Image
B
14
S
4
G
1
Posts: 268
Reputation: 1,794

Post » Tue Oct 27, 2015 4:34 pm

@Rable
I don't have all the plugins needed to open your capx.
Did you add the four imagepoints to the corners of the walls? The first needs to be top-left, then clockwise top-right ... and so on. If you have that and it's still not working then maybe there is a typo.

If you think you may have made a typo you could just copy my events over as is. Take my capx and rename player to charWoldmap, and walls to collision. Then select all the events and copy it (ctrl+c). Next go to your capx and you can paste it (ctrl+z).
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Fri Oct 30, 2015 8:23 am

Oh, sorry, I just forgot to add the 4 image points! I was to enthusiastic to take the time to place them. ^^'
I'll try again and I'm sure it will work this time.

Thanks!

Edit :
Wow, it's working perfectly now! Thanks a LOT @R0j0hound , without your code I would have had to use a completely different (and lesser) solution.

Thanks a lot to @rexrainbow too, of course, for the original moveto behavior!
Image
B
14
S
4
G
1
Posts: 268
Reputation: 1,794

Post » Wed Nov 04, 2015 10:34 am

First I would like to say a very big thank you for this great plugin. It's a real time saver. However, I have some questions. Maybe I'm not getting things exactly right..

I'm doing a game where an alert(a background image and two buttons) pops down from top of the screen (invisible area) to the main screen, when a player fails. Basically the alert pops down and says "You have failed, would you like to continue?", and then a "YES" and "NO" button to either continue or exit to the main menu.

So, I'm moving these 3 image objects(the background, "Yes" button and "No" button) using the MoveTo plugin. Coming down is fine, however, when the user chooses YES, the alert is supposed to go back up into the invisible area so the game can continue but it isn't. It's almost like it tries to, but hangs immediately. Moves about 1 pixel then returns back. You keep pressing YES the same keeps happening over and over, and at the end of the day, the alert is still at the same place.

How do fix this please?
B
4
Posts: 5
Reputation: 208

Post » Sat Dec 05, 2015 5:09 pm

hey rex i dowloaded your plugin move to. it worked once and now i can't open my project.....
can you help me or do i have to do the whole thing aguain ?
B
2
Posts: 3
Reputation: 156

Post » Sat Dec 05, 2015 5:18 pm

Misterballooneko wrote:hey rex i dowloaded your plugin move to. it worked once and now i can't open my project.....
can you help me or do i have to do the whole thing aguain ?


What has not being able to open your project have to do with the move-to-plugin?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Sat Dec 05, 2015 5:25 pm

nevermind it works it was on the wrong file. sorry....
B
2
Posts: 3
Reputation: 156

Post » Fri Dec 11, 2015 1:46 am

move to download link pls
B
10
S
3
Posts: 21
Reputation: 710

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: rexrainbow and 1 guest