How do I Rotate an object to keep it flat against an object?

Get help using Construct 2

Post » Mon Nov 16, 2015 1:38 pm

How do i rotate an object so it stays flat on a other object?? look at image to see that i mean!

I want the snowmobile to stay flat against the ground!


Image
B
4
Posts: 11
Reputation: 222

Post » Mon Nov 16, 2015 1:47 pm

Depending on the way you have things set up there are many ways..

One of the easiest ways would probably be to have invisible objects following the angles of your slope and setting the angle of your snowmobile based on overlapping at offset of those objects..

Not sure if it's possible in your case, but dividing your snowmobile in front and backtires would even make this more realistic..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 16, 2015 1:53 pm

Yeah, also how do i do a screen effect? i made a gif of snow and i have imported the animation, but now i want to give it a clear background?!
B
4
Posts: 11
Reputation: 222

Post » Mon Nov 16, 2015 2:10 pm

Best way would be to import it with a clear background..
Using effects is much more intensive to render..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 16, 2015 3:38 pm

okay thanks, sorry for all the questions but how would i make sure that an event only happened once or only when covering a certain sprite?
B
4
Posts: 11
Reputation: 222

Post » Mon Nov 16, 2015 3:45 pm

Using a triggered event would be the way to only trigger once..
If you only want something to happen when covering another sprite, you could check for overlap or maybe on collision, whichever suits you best..

As these are pretty basic questions, have you followed any of the beginners tutorials?
Read the "how events work" section of the manual?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 16, 2015 3:54 pm

youre not getting what i mean... heres the situatuion:

The player runs up to the snowmobile
Event: the player gets on the snomobile and speed is increased same with acceleration

the snowmobile breaks after taking too much damage and the character is kicked off it

I now do not want the player to be able to get back on the snowmobile. i tried setting the snowmobile to be destroyed but then it just dissapeares...
B
4
Posts: 11
Reputation: 222

Post » Mon Nov 16, 2015 4:45 pm

Well a simple instance variable would take care of that, added as a condition in the collision event..
For example a boolean variable AlreadyUsed..
So when the player is kicked off the snowmobile set it to true..
And in the player collision event check if it's set..
If not, player can mount the snowmobile..?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 17, 2015 11:49 am

thanks, how do i make a text box say the contents of variable? ive tried on what it says in the beginners guide but it doesnt work. my variable doesnt come up.
B
4
Posts: 11
Reputation: 222

Post » Tue Nov 17, 2015 12:13 pm

" ive tried on what it says in the beginners guide but it doesnt work" - try it again, you have probably made a mistake. Look at the example and work out what it is doing...
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892


Return to How do I....?

Who is online

Users browsing this forum: dop2000, LunaticCat and 7 guests