Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (alibaba), 3,864 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
set entity name in script #224477
08/30/08 13:21
08/30/08 13:21
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hi,

is it possible to set the name of an entity that has been created by ent_create like it can be done in WED?

I tried

entity.link.name = "somename";

but although the compiler throws no error it doesn't seem to set the entity's name :-(

By the way ... why are string1 / string2 only read-only ???
I would prefer to handle my entities created by ent_create the same way I handle the entities set in WED.
As string1 / string2 are read-only i have to handle them different ... is there really no way to set string1/string2 for a entity created by ent_create?

Best regards,
Pegamode

Re: set entity name in script [Re: pegamode] #224626
08/31/08 12:30
08/31/08 12:30
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
In meantime we found a solution ourselves:

entity.link.name is working. Don't know why it failed in the first try.

string1 / string2 can be set with

entity.string1 and entity.string2 although they are defined as read-only.

Re: set entity name in script [Re: pegamode] #224773
09/01/08 06:41
09/01/08 06:41
Joined: Jul 2000
Posts: 28,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
Frankfurt
The strings are read only because they are char*, not STRING*. That's why they can be read, but not manipulated with string functions. But you can change them to another char* under lite-C.


Moderated by  old_bill, Tobias 

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