Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,266 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: wed plugin problem. [Re: _cash_] #351287
12/23/10 11:26
12/23/10 11:26
Joined: Oct 2006
Posts: 23
Turkey
_cash_ Offline OP
Newbie
_cash_  Offline OP
Newbie

Joined: Oct 2006
Posts: 23
Turkey

Re: wed plugin problem. [Re: _cash_] #351324
12/23/10 17:26
12/23/10 17:26
Joined: Sep 2003
Posts: 158
Wlad Offline

Conitec
Wlad  Offline

Conitec

Joined: Sep 2003
Posts: 158
>>set String1 or String2

your code:

//////////////////
CObjEditInterface *oei=gp_WedInterface->object_GetEditInterface();

oei->obje_SelectObjID(oi->Id,true);
MODELINFO mi;
oei->obje_GetInfo (&mi);
strncpy(mi.String1,komutlar[id].komut_data,30);
strcpy(mi.String2,"ddd"); //this line crash
////////////////////////

You can use the "obje_GetInfo" only to get object data, but not for change. The String1 and String2 are defined as "constant char *".



>> ... i cant change skill9-skill20 area. ...

At the moment you kann set all 20 skills only if the entity has EXTENDED typ. Otherwise, you can set only 8 skills.
The entity is EXTENDED wenn String1 or String2 or Material or Path are defined, or Albedo is not equal 50.




Unfortunately, with current WED Plugin SDK you cann create new entity with defined String1/2 and other features, but you can not change
some parameters als String1 or String2 by existing entities.


I have the functions "obje_SetObjData" and "obje_GetObjData" completed, so that it is now possible.

A example for setting new values for String1 and String2:

///////////////////////////////////////////////
CObjEditInterface *oei=gp_WedInterface->object_GetEditInterfaceID(oi->Id);

oei->obje_SetObjData ( OBJD_STRING, 0, "string for string 1", 19);
oei->obje_SetObjData ( OBJD_STRING, 1, "string for string 2", 19);
//////////////////////////////////////////////


I have added to OBJDATA enum other members:

OBJD_AMBIENT, //idx 0, data typ float ptr, datasize = sizeof(float)
OBJD_ALBEDO, //index 0, data typ float ptr, datasize = sizeof(float)
OBJD_PATH, //index 0, data typ string, datasize = string length or buffer size
OBJD_ATTACHED, //index 0, data typ string, datasize = string length or buffer size
OBJD_MATERIAL, //index 0, data typ string, datasize = string length or buffer size
OBJD_STRING, //index 0-1, data typ string, datasize = string length or buffer size


and it is now possible set (or get with "obje_GetObjData") this values:

float amb = 3.33f;
oei->obje_SetObjData ( OBJD_AMBIENT, 0, &amb, sizeof(amb));

float alb=55.55f;
oei->obje_SetObjData ( OBJD_ALBEDO, 0, &alb, sizeof(alb));

oei->obje_SetObjData ( OBJD_PATH, 0, "path_123", 8);
oei->obje_SetObjData ( OBJD_ATTACHED, 0, "attached_123", 12);
oei->obje_SetObjData ( OBJD_MATERIAL, 0, "mtrl_678", 8);



From WED version 6.957, you can use this possibility.



Re: wed plugin problem. [Re: Wlad] #351337
12/23/10 19:49
12/23/10 19:49
Joined: Oct 2006
Posts: 23
Turkey
_cash_ Offline OP
Newbie
_cash_  Offline OP
Newbie

Joined: Oct 2006
Posts: 23
Turkey
thank you for all of this.
i grateful for explanations.

we wait new wed sdk.

we finaly finish our ingame system to wed connection.

you seem to engine programer.
and its mean we have lots of question for you laugh

Re: wed plugin problem. [Re: _cash_] #351344
12/23/10 20:46
12/23/10 20:46
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
@cash, if i am not mistaken, he is the WED and wed sdk developer, JCL is the engine developer.


3333333333
Re: wed plugin problem. [Re: Quad] #351581
12/27/10 09:56
12/27/10 09:56
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The new WED, together with the new wed_i.h header file and examples, can be downloaded here:

http://server.conitec.net/down/wedsdk_patch.zip

The new WED will also be included in the next Gamestudio update 8.11. Then you can modify skill9-20 and string1/2 even on models that were created without them.

Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

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