Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Rotate entity function? #427014
08/01/13 09:06
08/01/13 09:06
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
I finally figured out how to place the player where I want it whenever a level is loaded. The only problem is that the player is always facing east everytime I use the ent_create function to create the player in a level.

Does anyone know of a function that I can use to rotate the player as well? I looked in the Help manual, and could not find one. Thanks in advance. :-)

Re: Rotate entity function? [Re: Ruben] #427016
08/01/13 09:13
08/01/13 09:13
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Well changing the pan value should be enough, shouldn't it?
Either set it at the start of the player function, for instance as follows:

var player_pan[8] = { 0, 90, 0, 180, 180 };

action my_player()
{
...
my.pan = player_pan[level_current];
}


Or set it after your ent_create call:

player = ent_create(...);
player.pan = player_pan[level_current];


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Rotate entity function? [Re: Superku] #427033
08/01/13 11:59
08/01/13 11:59
Joined: Jun 2013
Posts: 108
Alberta, Canada
C
CanadianDavid Offline
Member
CanadianDavid  Offline
Member
C

Joined: Jun 2013
Posts: 108
Alberta, Canada
@Superku I think he means the pan of the model is wrong.

@Ruben You can rotate the model in MED by opening the model then going to Object / Transform Global and rotating as necessary. Typically, your model should be facing to the right of the top-left view (The XY view if I am correct) but the actual rotation will depend on your code.

Re: Rotate entity function? [Re: CanadianDavid] #427035
08/01/13 12:10
08/01/13 12:10
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Ah I'm sorry...


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Rotate entity function? [Re: Superku] #427161
08/03/13 20:05
08/03/13 20:05
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Actually Superku, you were right. Your solution fixed my problem. Thank you. :-)


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