Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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