• Do not use Works in Progress as a way of avoiding the releases system! Works in Progress can be used for sharing early betas and for getting suggestions for improvement. Releases of finished content are not allowed in this forum! If you would like to submit a finished addon, click here for instructions on how to do so.

A_LinedefExecute..

Status
Not open for further replies.
Code:
/** Runs a linedef executor.
  *
  * \param actor The mobj sent with the linedef execution request. Its location
  *              is used to set the calling sector. The tag used is its state
  *              number (beginning from 0) plus 1000.
  * \sa A_LinedefExecute
  * \author Graue <graue@oceanbase.org>
  */
void A_LinedefExecute(mobj_t* actor)
{
	P_LinedefExecute((int)(1000 + (size_t)(actor->state - states)), actor, actor->subsector->sector);
}

So basically, it runs a linedef executor without having to be in a trigger sector (it considers the sector your object is currently in to be the 'trigger sector' when your object calls this). The tag that it calls is the state number + 1000. You can find state numbers easily through the SOC Editor.

Maybe you have an object, like a boss, and he has a 'ground pound' animation. You can put the A_LinedefExecute in his frame when he's pounding the ground to call a linedef executor and do something neat, like alter the ground height of surrounding sectors to respond to the pounding.
 
This is a pretty good idea. For instance, you could have a miniboss in the middle of a level, and have the exits open back up once he's been killed.
 
What switch? There's no switch involved in my example. The Thing that dies - the boss, in this case - is what opens the door, no stupid switch that could be activated at any point in time, letting you skip the boss entirely.
 
Shadow Hog said:
What switch? There's no switch involved in my example. The Thing that dies - the boss, in this case - is what opens the door, no stupid switch that could be activated at any point in time, letting you skip the boss entirely.

No, what I mean is, the egg capsule button. It would only appear after you defeat the boss.
 
Shadow Hog said:
What switch? There's no switch involved in my example..

Actually, I was asking SSNTails for an example wad. I still don't understand how to work these. x_X
 
Create a new empty SOC and open it in the SOC Editor. Go to the Edit States section, and choose S_PLAY_ATK1.

Change S_PLAY_ATK1's action to A_LinedefExecute. Save. Close SOC Editor.


Make a level that has a regular linedef executor. For the tag# of the trigger linedef (has special type of 95-99), put 1013 for its tag. You don't need to make any kind of trigger sector (special types of 971-975).

I've never used it, personally. a441 implemented this thing. Mystic might have some kind of example.
 
SSNTails said:
Create a new empty SOC and open it in the SOC Editor. Go to the Edit States section, and choose S_PLAY_ATK1.

Change S_PLAY_ATK1's action to A_LinedefExecute. Save. Close SOC Editor.


Make a level that has a regular linedef executor. For the tag# of the trigger linedef (has special type of 95-99), put 1013 for its tag. You don't need to make any kind of trigger sector (special types of 971-975).

I've never used it, personally. a441 implemented this thing. Mystic might have some kind of example.

It's not that I think it won't work, it's just I don't understand half of it...
 
Exactly. Since no one seems to have used it, we don't know if it even WORKS. >_>
Anyways, I'll try giving it another shot, if it doesn't work, I deem it broken. :P
 
Send me your WAD/SOC and I'll tell you what you're doing wrong.
 
Alright, I understand how to do what he's saying. Let me give it a whirl, too.

Although, are we limited only to that one tag? It'd be nice to have some way of specifying what number tag it'd execute, even if I can't think of how.
 
Shadow Hog said:
Although, are we limited only to that one tag? It'd be nice to have some way of specifying what number tag it'd execute, even if I can't think of how.

Each state is a different value, so on each state A_LinedefExecute is called, you have a different tag. If you want it to change the tag you're calling, create another state for the object to change to and put A_LinedefExecute in it.

Maybe your boss has a GroundPound1 animation sequence, and GroundPound2 does something different.
 
I fully understand how this works but I'm too lazy to make an example WAD.

Basically, let's say you want to "bind" an line-exec to either a player's special animation (Either flying or gliding, depending on who you are). So you change the first frame's action to A_LinedefExecute and then create a control sector in the map with a line-exec that would be called with the state number that the first frame in the animation has plus 1000. (Example: If the state number was 55, the tag would be 1055.) When this player does the action that calls this animation, the first frame will trigger the line-exec. Like, say for instance, if you replaced the special animation with a ground pound animation (like SSN said) and call the line-exec "Lower Trigger Sector" with a height of 32, each time the player does the special animation, the player would lower the current sector he's in by 32. Making it like a digging skill.

Yes, it's possible to create totally new player skills in this way or to create very interesting bosses. Definately very unique....
 
JJames19119 said:
7 the player would lower the current sector he's in

Oh, but not the current one he's in... the one with the 1055 tag would be affected.
 
I have the example WAD working, albeit not on me right now. It changes music whenever you jump.

It also has a nice HOM, and for whatever reason, DoomBuilder ISN'T complaining about a lack of an Upper Texture on the thok barrier (which has F_SKY1 for a ceiling, so you can guess why). Very, very weird. But the A_LinedefExecute works like a charm, so that's all that matters.
 
Lemme see it the wad. Maybe I can fix it? I've seen similar problems before and have fixed those.
 
SSNTails said:
JJames19119 said:
7 the player would lower the current sector he's in

Oh, but not the current one he's in... the one with the 1055 tag would be affected.

Didn't you say that the sector the player is in is the trigger sector?

JJames19119 said:
call the line-exec "Lower Trigger Sector" with a height of 32, each time the player does the special animation, the player would lower the current sector he's in by 32.

Unless there's no such thing as a line-exec that lowers the actual trigger sector. If so, then I must've been gone TOO long. :|
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top