Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Assign actions to and set flags on terrain #318909
04/10/10 18:05
04/10/10 18:05
Joined: Apr 2010
Posts: 38
D
deianthropus Offline OP
Newbie
deianthropus  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 38
I know, it's a really noobish question, but the manual and workshops only cover tangential subjects to this, and breifly. So really, this is a workflow question (my background being in php, the multi-application dev environment is really screwing with me)

I want to assign flags to a terrain which I've placed in a WMB using WED. So I created a script to attach to the level, which i've included in my main.c. I then attached the action to the terrain entity. I run the main.c, and it appears to load the script, (I no longer get an "action not found") but the flags are not being set.

Is it because I am using "my" without setting it? How can I reuse the flag-setting action for different levels and terrains if I have to manually point the action to each terrain entity? I thought that an action ascribed to an entity in WED automatically sets "my"?

action set_my_flags() {
///i've tried all of these individually; no cigar
my.flags &= PH_POLY;
set(my,PH_POLY);
phent_settype(me,RIGID,PH_POLY);
}

Which method should I use, and what steps am I omitting?

Re: Assign actions to and set flags on terrain [Re: deianthropus] #318910
04/10/10 18:11
04/10/10 18:11
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
set is okay, but you setted the wrong flag xD

set(me, POLYGON);


btw: when your terrain is a hmp the POLYGON flag is automatically setted AND if not, you can set the POLYGON flag in WED directly wink

Last edited by Rei_Ayanami; 04/10/10 18:12.
Re: Assign actions to and set flags on terrain [Re: Rei_Ayanami] #318931
04/10/10 20:33
04/10/10 20:33
Joined: Apr 2010
Posts: 38
D
deianthropus Offline OP
Newbie
deianthropus  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 38
I see. Thanks for the input. The reason for my problem (collisions not appearing to occur where the mesh is) must be that I scaled my hmp file within WED, thus creating a mismatch between rendered terrain and terrain data used by the physics engine. Sound about right?

EDIT: Tested it, did not work (the polygon flag nor keeping terrain consistent).

Last edited by deianthropus; 04/10/10 22:53.

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