Gamestudio Links
Zorro Links
Newest Posts
How to buy tomorrow at open?
by frutza. 06/01/23 19:58
Adding Position to Current Trade
by AndrewAMD. 05/30/23 10:34
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
Return type of floor()
by AndrewAMD. 05/25/23 14:17
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (AndrewAMD), 1,065 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Urgent...I need some help...plzzzzzzzz...... #101474
12/07/06 05:53
12/07/06 05:53
Joined: Dec 2006
Posts: 3
Indonesia
V
viaaaa Offline OP
Guest
viaaaa  Offline OP
Guest
V

Joined: Dec 2006
Posts: 3
Indonesia
I need some help...how to make random of level or random of object (include scripting of it with C script). This game about 3D Game Edutainmet about introducing of language for children ( 8 till 12 years old). If they play a game,they must find the object that be selected word in panel. If they success find the object, the score added and the next selected word will be appears and object must be find again. So,how to make random of level or random of object (include scripting of it with C script) to make the game dynamic?? Thx alot b4.

Re: Urgent...I need some help...plzzzzzzzz...... [Re: viaaaa] #101475
12/10/06 18:42
12/10/06 18:42
Joined: May 2005
Posts: 155
C:\Program files\GStudio6
alphaindigo Offline
Member
alphaindigo  Offline
Member

Joined: May 2005
Posts: 155
C:\Program files\GStudio6
how about ahving a model that ent_morphs itself into a variety of different models via the rand() comand and some if statements eg

temp = rand(2);
if (temp<1)
{
ent_morph(me,model1);
}
else
{
if(temp<2)
{
ent_morph(me,model2);
}
else
{
ent_morph (me,model3);
}
}


beware the sock! - tLempoary...
Re: Urgent...I need some help...plzzzzzzzz...... [Re: alphaindigo] #101476
12/12/06 14:39
12/12/06 14:39
Joined: Dec 2006
Posts: 3
Indonesia
V
viaaaa Offline OP
Guest
viaaaa  Offline OP
Guest
V

Joined: Dec 2006
Posts: 3
Indonesia
Ok...I'll try to use the script...Thanks alot for ur reply..sMile

Re: Urgent...I need some help...plzzzzzzzz...... [Re: viaaaa] #101477
12/18/06 15:59
12/18/06 15:59
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
alphaindigo, I have no idea just where you have found that "rand()" command, but afaik there is no such function in 3dgs at all.
In correct code -i.e. without missing brackets and unexistant functions- you'd need something like this:
Code:

var num = int( random( 3 ) );
if( num == 1 )
{
ent_morph( my,"first_model.mdl" );
}
if( num == 2 )
{
ent_morph( my,"second_model.mdl" );
}
if( num == 3 )
{
ent_morph( my,"third_model.mdl" );
}



No offense alphaindigo, but you should take a little bit more care before offering code examples to people. Newbies can easily get confused by codes that don't work as expected.


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?

Moderated by  HeelX, rvL_eXile 

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