Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (juanex, AndrewAMD), 988 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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 | 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