How do I make 3d trigger fields?

Archive of the old editing forum
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.
Locked
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

How do I make 3d trigger fields?

Post by printz »

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.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How do I make 3d trigger fields?

Post by Gez »

No.

It wouldn't be hard to create one in DECORATE, but if you aren't allowed that, then too bad.
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: How do I make 3d trigger fields?

Post by printz »

What about 3d floors that trigger something when touched or walked through? (like in Quake)
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Re: How do I make 3d trigger fields?

Post by chopkinsca »

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.
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: How do I make 3d trigger fields?

Post by printz »

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!

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
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.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How do I make 3d trigger fields?

Post by Nash »

Would user variables help?

[wiki]GetUserVariable[/wiki]
[wiki]SetUserVariable[/wiki]

[wiki]GetUserArray[/wiki]
[wiki]SetUserArray[/wiki]

[wiki]A_SetUserVar[/wiki]
[wiki]A_SetUserArray[/wiki]
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: How do I make 3d trigger fields?

Post by printz »

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.
Locked

Return to “Editing (Archive)”