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?