Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
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
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 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
Page 1 of 2 1 2
[WED SDK] Can't set or change an Entitiy's Action #202106
04/13/08 12:13
04/13/08 12:13
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
The topic says it all..

What I'm trying to do, is create a new model and set some default values for it. Although everything else is set (string1, string2, material, position, scale..), the action string always remains "ndef".

Here's some code...


 Code:
DWORD AddWaypoint_Open ( const void  * execute_arg, void * data, DWORD * execute_flags, UINT execute_handle)
{
	char Name[128] = "Waypoint";
	char File[128] = "ix_waypoint.mdl";
	char Action[128] = "HERE IS THE PROBLEM";
	float Skills[20] = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 };
	int nSkills = 0;
	DWORD Flags = 0;
	float Ambient = 0;
	float Albedo = 0;
	char Path[128]="";
	char Attached[128]="";
	char Material[128]="THIS STUFF IS SET JUST FINE";
	char String1[1024]="SO IS THIS";
	char String2[1024]="";


	CObjTrans trans;

	gp_WedInterface->GetCameraPosition(0,trans.Pos,0);
	trans.scl().x= trans.scl().y = trans.scl().z = 1;
	trans.dwFlags = (OBJTR_POS|OBJTR_ROT|OBJTR_SCL);


	CNodeInfo	Node;
	gp_WedInterface->object_GetCurrentNode ( & Node);
	gp_WedInterface->object_SelectObjectID ( Node.Id);


	wedpi_CreateModel ( *gp_WedInterface,
						Node.Id,trans, Name,File,
						Action,Skills,nSkills,Flags,Ambient,Albedo,
						Path,Attached,Material,String1,String2);

	gp_WedInterface->DrawLevel();

	return TRUE;
}



I've also tried to change the action string After the model is created, using both obje_SetObjData(OBJD_ACTION,...) and DoCommand(piHandle, WCMD_MD_SETACTIONNAME,...) but nothing works. I don't get any errors or anything, they just seem to have no effect, although obje_GetObjData(OBJD_ACTION,...) and DoCommand(piHandle, WCMD_GETACTIONINFO,...) work great for Retrieving the action name..

I'm using the latest wed sdk and A7.08.2b


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #202302
04/14/08 10:31
04/14/08 10:31
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
I've just uploaded a new SDK to the Download Page, but I'm not sure that the old version was the reason for the problem. I'll forward this to Wladimir for looking into it.

Re: [WED SDK] Can't set or change an Entitiy's Action [Re: jcl] #202652
04/16/08 11:25
04/16/08 11:25
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Thanks.

There's also one more function that I'm really missing for setting the main script attached to the level. I guess it should be something like this:

int wdl_SetMainScriptName ( char * reName, int bufSize);

Right now, there's only wdl_CreateMainScript() which brings up a dialog window, but nothing to set the mainScript string directly.


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #213416
06/27/08 17:14
06/27/08 17:14
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
I noticed a public beta coming up soon, so is there any progress about this bug yet? I think that not being able to set an action name for an entity, or the name of a script file for a level are pretty huge drawbacks of the wed/sdk, and everyone that uses it will run up to this problem sooner or later..

Cheers!
Aris


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #213726
06/30/08 11:36
06/30/08 11:36
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Yes, the action name bug will be fixed in the public beta. There is no real function for assigning a script file - a level has no own script file, that's just a placeholder for the main game script used to test the level in WED.

Re: [WED SDK] Can't set or change an Entitiy's Action [Re: jcl] #213886
07/01/08 11:54
07/01/08 11:54
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Quote:
Yes, the action name bug will be fixed in the public beta.


That's great news. Thanks!


Quote:
There is no real function for assigning a script file - a level has no own script file, that's just a placeholder for the main game script used to test the level in WED.


That's exacly what I need to be able to change through the sdk. The name of the script is indeed saved in the .wmp and the only workaround I can see to change it is to modify the wmp file directly, which isn't exactly fun... Changing the main script used to test a level in wed is -very- important for a template solution, like your T7 or my product, because WED is the only mean for a user to test his game from. I want the users to be able to 'import' a level they've already created into their project, which will then get assigned with the main script's name automatically, so they'll be able to test-run their game from WED:


My panel. Import level is grayed out cause I can't do that with the current version of wedsdk





INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #214049
07/02/08 09:21
07/02/08 09:21
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Ok, I see. We'll add this to the SDK, as well as your prior suggestions with a more flexible control of menu items. It's too late for this update - the release candidate jsut came out - but it will make it into the next.

Re: [WED SDK] Can't set or change an Entitiy's Action [Re: jcl] #214068
07/02/08 11:10
07/02/08 11:10
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Thanks for the birthday present jcl wink


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #214515
07/05/08 00:55
07/05/08 00:55
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Just installed the public beta and was happy to see that the action name bug is indeed fixed.

About that SetMainScriptName() function, will this still make it for the coming up public release, or did u mean the next public release in 2-3 months or so? If it's the latest, is there anyway I could convince you otherwise?(I've read somewhere on the site that you can pay for features, which I'd be happy to)

Before asking I spent all day today trying to hack the .wmp to change the script name myself, but everytime I'd change the length of the main script's name I'd receive an "Unexpected end of file found" error from WED. This feature is pretty vital for my project and i'd hate if I had to postpone its release for 3 more months frown

Thanks for considering..
Aris


PS: About my other wedsdk suggestions, I could live without them for a few more months/years....


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: [WED SDK] Can't set or change an Entitiy's Action [Re: LarryLaffer] #214759
07/07/08 07:59
07/07/08 07:59
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
The script name is not included in the upcoming version, but it's a part of the WMP SDK anyway that is independent of the engine releases. So you won't need to wait for the next-but-one version to get the script setting feature.

Page 1 of 2 1 2

Moderated by  jcl, Nems, Spirit, 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