TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
How to Make an actor like this
Pages:
1
How to Make an actor like this
Sunny
Posts: 53
February 22, 2015, 02:41:03 pm
Hey, how do i make an actor behave like the spaceship in this game:
https://www.youtube.com/watch?v=KXrpp774ADU
Say I use keyboard left and right keys to turn the actor left and right
Thanks,
Sunny
Sunny
Posts: 53
February 22, 2015, 03:05:36 pm
Also, how would i go about making a sort of endless scene? With the actor free to move top, down, left or right?
Any help would be appreciated!
t4u
Posts: 418
February 24, 2015, 05:09:07 pm
How movement should work:
The speed of ship(black - total vector of speed, red - ship) is at some angle to axis(ugly yellow). As you know you can use trygonometric functions to calculate x-speed and y-speed(green and orange) that when added give black vector.
As you press right you increase angle. For the new angle (and black arrow pointin in another direction but wiht the same length) you calculate x-speed and y-speed. You set them to your ship actor. This should do the trick.
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.
Tutorials + downloads:
http://t4upl.blogspot.com/
ETHproductions
Posts: 430
February 24, 2015, 06:39:56 pm
An easier alternative to calculating x- and y-speed would be to use the 'set velocity' block. Its 'angle' input takes care of all the trigonometry for you.
Fontstruct
-
Stencyl
-
Website
(in progress)
Proud Member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.
Pages:
1