Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, degenerate_762), 1,430 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fill skills #212854
06/24/08 17:23
06/24/08 17:23
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Hi,

I have a problem with my script, I am trying to write a value to 4 skills, but I get a error.
This is the relevent code from the Action which is connected to a model in WED.

Code:
my.Skill41 = float(random(2)-1);
my.Skill42 = float(random(2)-1);
my.Skill43 = float(random(2)-1);
my.Skill44 = float(1.5);

ERROR:

Code:
Error in 'MAIN' lime 35: 'Skill41' : is not a member of 'ENTITY'



The best games are the games you create yourself.
Re: Fill skills [Re: NL_3DGS_n00b] #212856
06/24/08 17:36
06/24/08 17:36
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Hi i see 2 problems...

1) You are using "Skill" instead of "skill", lite-c is case-sensitive remember.
2) You are using the old c-script float function. It has been replaced by floatv in lite-c.

You code should look like this...

my.skill41 = floatv(random(2)-1);
my.skill42 = floatv(random(2)-1);
my.skill43 = floatv(random(2)-1);
my.skill44 = floatv(1.5);

Re: Fill skills [Re: DJBMASTER] #212857
06/24/08 17:46
06/24/08 17:46
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
OH MY GOD! (Feeling very stupid right now...)
I already tried it lowercase, but I forgot about floatv.
Thank you very much.

Another question, how can I draw a black panel?
Can I just use 1px black panel and stretch it or something?


The best games are the games you create yourself.
Re: Fill skills [Re: NL_3DGS_n00b] #212858
06/24/08 17:49
06/24/08 17:49
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
do you want to draw it using code or load in a black image file?

Create it in MS paint or another graphics program and then use normal panels but don't set the OVERLAY flag.

I wouldn't recommend you draw it using code when loading an image is easier and effective.

Re: Fill skills [Re: DJBMASTER] #212860
06/24/08 18:02
06/24/08 18:02
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
It's for a transparent black panel with debug text on it.
I will use a 1px image, but I thought I read somewhere that you can scale it to a specific size.
I want it to be 1024px x 30px.


The best games are the games you create yourself.
Re: Fill skills [Re: NL_3DGS_n00b] #212870
06/24/08 19:08
06/24/08 19:08
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
well i'm not entirely sure how loading images in video memory works but i would guess that it is the same, if you load a 1024 x 30 or if you scale a small image to a larger size.

A more experienced 3DGS user will have to confirm/correct this...

Re: Fill skills [Re: DJBMASTER] #212896
06/24/08 22:39
06/24/08 22:39
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
scaling an image does not consume more memory. the image will be still 1x1 pixels but the triangles it is rendered onto are scaled.

Re: Fill skills [Re: Joey] #212907
06/24/08 23:32
06/24/08 23:32
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
triangles? This image is loaded as a panel so it will be drawn to the screen...not on a model.

Please explain why using a panel would render to triangles.

Last edited by DJBMASTER; 06/24/08 23:33.

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