Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Newbie Questions
by AndrewAMD. 12/04/23 11:14
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (TipmyPip, Quad, alibaba, izorro), 545 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Cscript question???? #268660
05/30/09 14:10
05/30/09 14:10
Joined: May 2009
Posts: 11
Romania, Targu Mures
F
F_P_kefas Offline OP
Newbie
F_P_kefas  Offline OP
Newbie
F

Joined: May 2009
Posts: 11
Romania, Targu Mures

Can I use a string type for refernce to an entity function?

Ex:

str block_str;
....
....


action block_1{
.....}

str_cpy(block_str,"block_1");
ent_create (wall_1,vector(100,0,0), block_str);




Or someone knows a better way to use the same ent_create function whit different entity action??


hello
Re: Cscript question???? [Re: F_P_kefas] #268825
05/31/09 10:30
05/31/09 10:30
Joined: May 2009
Posts: 11
Romania, Targu Mures
F
F_P_kefas Offline OP
Newbie
F_P_kefas  Offline OP
Newbie
F

Joined: May 2009
Posts: 11
Romania, Targu Mures
Can someone help me whit the quastion posted before?


hello
Re: Cscript question???? [Re: F_P_kefas] #268826
05/31/09 10:40
05/31/09 10:40
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
No you cant. A string and an action are two different things. A string is some text while an action does something with an entity.

For the action in ent_create you need an action and not a string. For different entity actions, you must use different ent_create calls.

Re: Cscript question???? [Re: Tobias] #268828
05/31/09 10:44
05/31/09 10:44
Joined: May 2009
Posts: 11
Romania, Targu Mures
F
F_P_kefas Offline OP
Newbie
F_P_kefas  Offline OP
Newbie
F

Joined: May 2009
Posts: 11
Romania, Targu Mures
Thanks.

I tought so, based on the experiments.
Each ent_create needs to have separate action(if you want the entitys to do different actions).

I was just wondering how to turn a string to a function name.


hello
Re: Cscript question???? [Re: F_P_kefas] #268830
05/31/09 10:51
05/31/09 10:51
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Only with A7. If you have A7, look for engine_getscript in the manual.

But your code looks like A6 WDL code. Thats a difficult way to write scripts, and very limited. I don't think that engine_getscript works in WDL code.


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