Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by jcl. 05/05/26 11:20
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (VoroneTZ, AndrewAMD, alibaba, 2 invisible), 5,417 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dangyc, ukgamer, valino, juergenwue, VladMak
19211 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