How do I make 3d trigger fields?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
How do I make 3d trigger fields?
Are there any actors I can use that trigger a special when the player gets close enough to them? Note that I'm not allowed to use linedef triggers, sector trigger things or DECORATE.
Re: How do I make 3d trigger fields?
No.
It wouldn't be hard to create one in DECORATE, but if you aren't allowed that, then too bad.
It wouldn't be hard to create one in DECORATE, but if you aren't allowed that, then too bad.
Re: How do I make 3d trigger fields?
What about 3d floors that trigger something when touched or walked through? (like in Quake)
- chopkinsca
- Posts: 1325
- Joined: Thu Dec 11, 2003 5:03 pm
Re: How do I make 3d trigger fields?
Not using linedef triggers kind of limits it. You'd have to check if the player is in the basic sector, then run a height check on the player when they are at the proper Z value to trigger the event.
Re: How do I make 3d trigger fields?
I'm considering using map spots, whose arg fields contain distance info, and a periodic ACS call to poll for the player being close to the spots. To read from arg0, arg1 etc., I'm using [wiki]GetThingUDMFInt[/wiki]. But I'm getting result 0, and when I look in the 2.5.0 source code, it says it hasn't been implemented yet!
I'm using ZDoom r3334, the latest GZdoom availabe SVN.
What would essentially help me is a list of variables and arrays that can be set at design-time, either from TEXTMAP or MAPINFO, and I've considered storing those variables inside map spot args. I can't use [wiki]GetLineUDMFInt[/wiki] instead, because the map structure doesn't allow me.
Code: Select all
int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
{
AActor *actor;
switch(funcIndex)
{
case ACSF_GetLineUDMFInt:
return GetUDMFInt(UDMF_Line, LineFromID(args[0]), FBehavior::StaticLookupString(args[1]));
case ACSF_GetLineUDMFFixed:
return GetUDMFFixed(UDMF_Line, LineFromID(args[0]), FBehavior::StaticLookupString(args[1]));
case ACSF_GetThingUDMFInt:
case ACSF_GetThingUDMFFixed:
return 0; // Not implemented yet
What would essentially help me is a list of variables and arrays that can be set at design-time, either from TEXTMAP or MAPINFO, and I've considered storing those variables inside map spot args. I can't use [wiki]GetLineUDMFInt[/wiki] instead, because the map structure doesn't allow me.
Re: How do I make 3d trigger fields?
Would user variables help?
[wiki]GetUserVariable[/wiki]
[wiki]SetUserVariable[/wiki]
[wiki]GetUserArray[/wiki]
[wiki]SetUserArray[/wiki]
[wiki]A_SetUserVar[/wiki]
[wiki]A_SetUserArray[/wiki]
[wiki]GetUserVariable[/wiki]
[wiki]SetUserVariable[/wiki]
[wiki]GetUserArray[/wiki]
[wiki]SetUserArray[/wiki]
[wiki]A_SetUserVar[/wiki]
[wiki]A_SetUserArray[/wiki]
Re: How do I make 3d trigger fields?
They work without me having to edit the DECORATE? I did use them earlier, but the result was always 0, then I asked about it here, and got told something about modifying the class' DECORATE field. Then, and now as well, I'm not allowed.