Gamestudio Links
Zorro Links
Newest Posts
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 (AndrewAMD, Ayumi), 1,384 guests, and 5 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
Problem with Compass!!/problem mit kompass #414244
12/27/12 15:54
12/27/12 15:54
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
hy guys i have made a battlefield style compass.. where in a window the compass pan show n e s w (without needle), the problem is when i have reach camera.pan 360, then the compass doesnt move anymore.. till i turn backwar 360.. hope u understand
--------------------------------------------------------------
ich hab einen battlefield style kompass also ein Kompass Band ohne Nadel, das sich mit der kamera mitdrehen soll, macht es auch aber sobald ich 360 pan von der kamera erreicht habe dreht sich der kompass nicht mehr mit, bis ich mit in die entgegengesetzte richtung wieder drehe.. hier der Code->
--------------------------------------------------------------
Code:
BMAP* kompass_tga = "kompass.tga"; // compassband


PANEL* kompass_pan = // compass
{
	window (310, 4, 80, 48, kompass_tga, vkompass, 0);
	flags = VISIBLE;
	layer = 5;
}


		pann = camera.pan;
		vkompass=integer(pann/2)+5;


Re: Problem with Compass!!/problem mit kompass [Re: thorus] #414253
12/27/12 17:24
12/27/12 17:24
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Du kannst cycle benutzen, um camera.pan in einem bestimmten bereich zu halten:

camera.pan = cycle(camera.pan, 0, 360);

EDIT: bzw. anstatt
pann = camera.pan;
einfach
pann = cycle(camera.pan, 0, 360);
verwenden

Last edited by Kartoffel; 12/27/12 17:27.

POTATO-MAN saves the day! - Random
Re: Problem with Compass!!/problem mit kompass [Re: Kartoffel] #414259
12/27/12 19:01
12/27/12 19:01
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
super danke karoffel, jetz ein neues problem wenn ich nen bestimmten bereich also 360 erreiche, dann hüpft meine gewehr kurz von links nach rechts (fps shooter)
weil ja der gewehr pan auf camera pan eingestellt ist denk ich mal, wüsstest du da eine lösung? sonst funktionierts mit dem kompass gut!

Re: Problem with Compass!!/problem mit kompass [Re: thorus] #414263
12/27/12 21:00
12/27/12 21:00
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
wenn die waffe an camera.pan angepasst wird, benutz das zweite beispiel, also:
pann = cycle(camera.pan, 0, 360);

damit wird camera.pan an sich nicht verändert, was den fehler beheben sollte

Last edited by Kartoffel; 12/27/12 21:10.

POTATO-MAN saves the day! - Random
Re: Problem with Compass!!/problem mit kompass [Re: Kartoffel] #414277
12/28/12 08:40
12/28/12 08:40
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
yehaa, du bist der beste laugh danke Kartoffel!!!


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