Another help topic

For questions about using Classic.

Post » Tue Oct 26, 2010 5:50 am

Is there a subsititue for "mod"?

Example
"PegBit('Pos') Mod 360"

I believe 'mod' is modular math.

3x = 2 (mod 4)


Also, I'm having some issue figuring out a light dash movement. Light Dash is a Sonic which enables him to move a long a trail for rings.

http://www.youtube.com/watch?v=xhPneOYfZK8#t=1m23s
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Tue Oct 26, 2010 7:04 am

Yep,
[url:27w8zzcy]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Expressions[/url:27w8zzcy]
[quote:27w8zzcy]% Modulus (remainder of division) [/quote:27w8zzcy]
B
79
S
24
G
54
Posts: 4,750
Reputation: 40,763

Post » Tue Oct 26, 2010 7:08 am

Thanks! Your so helpful.

Also...added a another question.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Tue Oct 26, 2010 7:17 am

Custom movement behavior perhaps?
Change speed towards direction.
Set for a timed boost, and add, or accelerate for on collision.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Tue Oct 26, 2010 7:19 am

I could use it with the Physic Behavior?
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Tue Oct 26, 2010 7:21 am

You could do that probably, but gravity direction might be an issue.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Tue Oct 26, 2010 7:27 am

I could disable the gravity if I comes to it.


Actually, it would great if I could have it move based on the angle of the object using the physic behavor.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Tue Oct 26, 2010 1:55 pm

To move a physics object at an angle, set the horizonal velocity to speed*cos(angle) and the vertical velocity to speed*sin(angle).
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests