≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Help with a simple ship project of mine
Posted by:
(you are not logged in)
Enter the missing letter in: "Inte?national"
(you are not logged in)
Text:
[quote][b][/b] wrote: You can do it with default actions/behaviours (without coding): When scene starts, before first drawing (and on reload): Set variable "Speed" = "0" When "W" is Released: Set variable "Speed" +1; When "S" is Released: Set variable "Speed" -1; Every few seconds (20ms): If "Speed" > "2", Set Variable "Speed" = "2"; If "Speed" < "-2", Set Variable "Speed = "-2"; Every few seconds (20ms): If "Speed" = "0", change relative position of "ship" (0,0,0) If "Speed" = "-1", change relative position of "ship" (-1,0,0) If "Speed" = "-2", change relative position of "ship" (-2,0,0) If "Speed" = "1", change relative position of "ship" (1,0,0) If "Speed" = "2", change relative position of "ship" (2,0,0) *Basically this method is the same as [b]aiming_bullets[/b] suggestion - but rather than using the variables to change the "player.movementspeed", you're using the variable to physically change position of the ship, every few milliseconds instead. The reason I'd use "on key release", instead of "on key press" is so it will increment the speed (up or down) on each "W" or "S" key depress - if you use "on key press" instead, windows has an annoying key-repeat feature - so if you hold a key down long, Windows repeats the keypress multiple times (which screws things up). The second part limits the variables to a range of "-2" to "+2", so you'll never get a speed of "3" or "-8" for example. As you can see, it looks like code, so you (or someone else) could probably easily use this template to convert it to code if you prefer. It looks a bit complicated, so I can make a ccb file to demonstrate it for you (if you don't get a better solution in the replies).[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact