Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Question about lifting entities [Re: flits] #260049
04/08/09 17:50
04/08/09 17:50
Joined: Aug 2006
Posts: 96
Netherlands
P
Polypfreak1987 Offline OP
Junior Member
Polypfreak1987  Offline OP
Junior Member
P

Joined: Aug 2006
Posts: 96
Netherlands
That was the exact aceleration what I wanted. Thank you.

I have another question. I want to stop the entity when it is on his way up (with the key "s") at every height you may choose.

I thought it was easy with:
Code:
height = height;


But that didn't work.

Thanks in advance.

Re: Question about lifting entities [Re: Polypfreak1987] #260081
04/08/09 19:56
04/08/09 19:56
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
Code:
function up() {
	var i = 0;
	while(height <= 1531 && !key_x &&  !key_x) {
		i += 0.1*time_step;
		i = clamp(i,0,2);
		height += i*time_step;
		wait(1);
	}
}


i geus you want to control it white the keys:
w = up
s = stop
x = down

and

Code:
height = height;

wont make any sense because the while loop is still running and 1=1 and 2=2 so it get increased every frame


"empty"
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1