2 registered members (dr_panther, 7th_zorro),
1,203
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: Stromausfall]
#281400
07/27/09 04:36
07/27/09 04:36
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
EngVar.time_smooth.FloatValue = 0.666f;
//CRASHES:: ?????
//collision
//EngVar.enable_polycollision.IntValue = (int)1;
EngVar.floor_range.IntValue = (int)100;
This is a statement in my init code and it now causes a crash, ( memory access error ). I had to comment it out for the moment. I dont know why it suddenly decides to cause problems that line but it did not before.
Last edited by pararealist; 07/27/09 04:37.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: DJBMASTER]
#281445
07/27/09 10:50
07/27/09 10:50
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Is it possible to let EngFun.engine_open() return an ENGINE_VARS struct? This way i think it might be possible to allow multiple instances of the engine to be used.
At first I thought multiple instances wasn't available because of accessing "acknex.DLL" simulataneously.You can create a C# app that runs the engine, and run the exe many and it will load seperate engine windows each time. The manual states the engine can be run many times even.
So i'm wondering which method could be used to load the engine multiple times, within the same exe? I'm in need of this for a MDI application, and i can't think of a way to get around it.
Or maybe you could explain to me why multiple instancing is not possible.
I know you said in an earlier post that functions like engine_frame() dont take an instance parameter, but if there was a way to return a structure or pointer from an engine_open call, then couldn't you use something like...
Engine_Ref ref_1 = EngFun.engine_open(null); Engine_Ref ref_2 = EngFun.engine_open(null);
Then each engine could be referenced with ref_1 and ref_2. Don't know how possible this is, just a thought.
I know i'm asking a lot but i' see so much potential in this wrapper.
Thanks.
Last edited by DJBMASTER; 07/27/09 10:52.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: Stromausfall]
#281492
07/27/09 14:14
07/27/09 14:14
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
EDIT:: Juist found in manual:
<<This variable must be set at the beginning of the main script before level loading.>>
SO: I guess i will have to open engine with null, Init the vars and then load my level. // Will let you know. Or you could try calling it (enable_polycollision) in the EngineInForm sample ( in IEnumerable MainFunction() ) to see the error. So it seems now it is not an error in the wrapper. // ALL is good.
Last edited by pararealist; 07/27/09 14:36.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: pararealist]
#281500
07/27/09 14:38
07/27/09 14:38
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
You dont need to cast them to (int) because it expects an int anyway. I've just tested "enable_polycollision" and i cant produce an error with it.
EDIT > posted this before i saw ur updated post. I didn't know that it had to be set before the level_load. Ok cool...
Last edited by DJBMASTER; 07/27/09 14:40.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: DJBMASTER]
#281505
07/27/09 14:57
07/27/09 14:57
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
I know, but i like putting (int) there because it helps me to see distinguish easilly between the type of variables in my code. Mind you my code is coming from C++ project so i left the casts in when i copied it.
Last edited by pararealist; 07/27/09 15:00.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: DJBMASTER]
#281506
07/27/09 14:58
07/27/09 14:58
|
Joined: Dec 2002
Posts: 616 Austria
Stromausfall
OP
User
|
OP
User
Joined: Dec 2002
Posts: 616
Austria
|
@pararealist: ah didn't know that, cool ^^ @amy: in lite-c afaik my is always set to the entity that is scheduled at the moment. But in the wrapper my is not set automatically that means, that for things like IGNORE_ME or USE_BOX in a c_trace you have to set the EngVar me (same as my) to the entity that should be be "me". The you variable isn't set by the scheduler afaik, but for example if an event like impact happens - that should work. The var conversion could be set in the properties but then references(pointers) to variables would be impossible or would have to be updated each frame. I know it's not perfect to write .IntValue and .FloatValue, but else references aren't possible as easy as they are at the moment. For the first version of the wrapper i wrote all by myself, for the next i let most EngFuns and all EngVars be generated by two small programms i wrote, but the problem is that there are many cases where this automatically created code has to be polished or doesn't mind all special cases - so it's only a small help, as many things have to be polished anyways after the creation
Last edited by Stromausfall; 07/27/09 15:01. Reason: typo ^^
|
|
|
|