Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to enlarge an entity in level corretly? #226556
09/10/08 10:21
09/10/08 10:21
Joined: Nov 2007
Posts: 37
L
LavenderSs Offline OP
Newbie
LavenderSs  Offline OP
Newbie
L

Joined: Nov 2007
Posts: 37
Hi, guys!
I'd like to make the entity be enlarged from one point to its normal size when it appears (maybe I press a key to make it show up) in my level. However, after I tried to use 'my.scale_x,my.scale_y,my.scale_z', the engine crashed as soon as it runs. The code is :

my.scale_x = 0;
my.scale_y =0;
my.scale_z = 0;
while(my.scale_x<1 || my.scale_y<1 || my.scale_z<1)
{
my.scale_x += 0.01 * time_step;
my.scale_x = minv(my.scale_x, 1);
my.scale_y += 0.01 * time_step;
my.scale_y = minv(my.scale_y, 1);
my.scale_z += 0.01 * time_step;
my.scale_z = minv(my.scale_z, 1);
wait(1);
}

Do anyone have a better idea of this matter??
Thanks very much!!!

Last edited by LavenderSs; 09/10/08 10:22.
Re: How to enlarge an entity in level corretly? [Re: LavenderSs] #226561
09/10/08 10:44
09/10/08 10:44
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Maybe, the engine can't accept a scale of zero!?

Re: How to enlarge an entity in level corretly? [Re: LavenderSs] #226639
09/10/08 16:40
09/10/08 16:40
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
me is NULL?

Re: How to enlarge an entity in level corretly? [Re: MrGuest] #226655
09/10/08 17:31
09/10/08 17:31
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Worked fine for me. I think it may be the ME pointer too.

But I would do it this way, for tidyness sake.
Code:
var cnt = 0;
for( cnt=0; cnt<1; cnt+=0.01 )
{   
   vec_set( my.scale_x, vector(cnt,cnt,cnt) );   
   wait(1);
}
//done



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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

Gamestudio download | 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