Mappers, put your thinking caps on
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.
Mappers, put your thinking caps on
Alright, people. I need to know the easiest and most effecient way to accomplish this seemingly simple task:
When the player summons a monster into the map, the script sets the monster's TID to a given value depending on where it's being spawned.
Any ideas?
When the player summons a monster into the map, the script sets the monster's TID to a given value depending on where it's being spawned.
Any ideas?
You can detect when any Thing enters the map by running a loop that constantly compares "ThingCount" to the old value (stored in a variable). Is there no way to act on this information?
Secondly, I can think of at least one (bad) way to do this. A monster-cross line that sets the TID of the activator when it is crossed, but only if it already has no TID. (Is this possible? I think it is, but I'm not sure.) The player could summon the monster in a box-like area and let it come forward to attack him, triggering the line. The script within could then teleport the monster elsewhere, deactivate him, and give him a TID until later needed.
I don't like this idea, however, because the monster might attack the player. Although, I suppose I could just make the player invurnerable. However, I still don't like it because it feels sloppy.
Is there no other way to do what I want?
Secondly, I can think of at least one (bad) way to do this. A monster-cross line that sets the TID of the activator when it is crossed, but only if it already has no TID. (Is this possible? I think it is, but I'm not sure.) The player could summon the monster in a box-like area and let it come forward to attack him, triggering the line. The script within could then teleport the monster elsewhere, deactivate him, and give him a TID until later needed.
I don't like this idea, however, because the monster might attack the player. Although, I suppose I could just make the player invurnerable. However, I still don't like it because it feels sloppy.
Is there no other way to do what I want?
you can set the tid of something:
as long as the line is a monster cross line
other than that, there's no way to randomly grab a monster summoned from the console any more than there's a way to randomly grab any monster without a unique tid, so in other words, no (but why not just have the player hit a switch that spawns a monster instead of summon)
Code: Select all
script 1 (void)
{
if(activatortid() == 0)
thing_changetid(0, newtid);
}
other than that, there's no way to randomly grab a monster summoned from the console any more than there's a way to randomly grab any monster without a unique tid, so in other words, no (but why not just have the player hit a switch that spawns a monster instead of summon)
Dammit. Neither Actor Hits Floor nor Actor Enters Sector trigger when something is summoned into a sector. I wonder if changing this would break compatibility with other things?
Time to go try to see if I can drop a summon over a ledge. ^_^;
[EDIT]Uhhh... If I'm flying over a sector with an "Actor hits fake floor" Thing in it, and I summon, the thing appears in midair and drops, but doesn't trigger the sector action when it lands. Why not?[/EDIT]
[EDIT#2]UHHHHH... If I summon an Imp on a 24-high ledge and let it fall into the sector to chase me, it doesn't trigger either. WTF?![/EDIT]
[EDIT#3]Nevermind, it's because the Deaf flag controls whether a monster can activate or not. Go me.[/EDIT]
[EDIT#4]CURSES!!!! Actor hits floor works PERFECTLY except that flying enemies don't hit the floor when summoned! And Actor enters sector doesn't work at all! Why, God, WHYYYYYY?!?!???[/EDIT]
Time to go try to see if I can drop a summon over a ledge. ^_^;
[EDIT]Uhhh... If I'm flying over a sector with an "Actor hits fake floor" Thing in it, and I summon, the thing appears in midair and drops, but doesn't trigger the sector action when it lands. Why not?[/EDIT]
[EDIT#2]UHHHHH... If I summon an Imp on a 24-high ledge and let it fall into the sector to chase me, it doesn't trigger either. WTF?![/EDIT]
[EDIT#3]Nevermind, it's because the Deaf flag controls whether a monster can activate or not. Go me.[/EDIT]
[EDIT#4]CURSES!!!! Actor hits floor works PERFECTLY except that flying enemies don't hit the floor when summoned! And Actor enters sector doesn't work at all! Why, God, WHYYYYYY?!?!???[/EDIT]
Last edited by HotWax on Thu Feb 12, 2004 12:45 am, edited 1 time in total.
Oh. Right. I was even thinking "make sure monsters can activate it" when I wrote that post, and then thought "silly, that only applies to lines" for some reason. Forgot the Deaf flag. heh. erm.
Should I be scared when naked people say this to me?HotWax wrote:THANK YOU EEVEE! I LOVE YOU!!!!
Last edited by Eevee on Thu Feb 12, 2004 12:51 am, edited 1 time in total.
/me makes a sacrifice to Randy and humbly requests that summoned Things trigger "Actor Enters Sector" scripts.
If this change isn't made, I've determined that I'm going to be relegated to using wind tunnels to fling the newly summoned enemies across trigger lines.
[EDIT]And... monsters... aren't... affected by...... wind....
ARGHGHHGHGHBHBLBLBHLBHLBHBLBHHBHBBHBB[/EDIT]
If this change isn't made, I've determined that I'm going to be relegated to using wind tunnels to fling the newly summoned enemies across trigger lines.

[EDIT]And... monsters... aren't... affected by...... wind....
ARGHGHHGHGHBHBLBLBHLBHLBHBLBHHBHBBHBB[/EDIT]
Ummm... Why is this line causing a message that never leaves the screen?
Also tried with the last argument set to 2 and 0.01, no change.
Also, can Lost Souls not be deactivated? I give one a TID as it flies across a line, and then deactivate that TID, but it contines attacking etc. I can tell that the TID stuck because further activations of that line don't work (I have the script set to skip the rest of the code if the actor already has a TID). Maybe just while they're attacking?
[EDIT]Sigh... Brick wall after brick wall...
Tell me why this isn't teleporting the activator:
I've already confirmed that the destination is being spawned by replacing it with "Cacodemon". Sure enough, a caco appears in the target area.
I know that TeleportDest is a legal Thing name because otherwise the while loop would repeat forever and ZDoom would report a runaway script.[/EDIT]
Code: Select all
HudMessageBold(s:"Team ", d:team, s:" now has ", d:count[team-1], s:" players."; 0, 0, -1, 0.0, 0.0, 10);
Also, can Lost Souls not be deactivated? I give one a TID as it flies across a line, and then deactivate that TID, but it contines attacking etc. I can tell that the TID stuck because further activations of that line don't work (I have the script set to skip the rest of the code if the actor already has a TID). Maybe just while they're attacking?
[EDIT]Sigh... Brick wall after brick wall...
Tell me why this isn't teleporting the activator:
Code: Select all
do {
Spawn("TeleportDest", random(xmin, xmax), random(ymin[team-1], ymax[team-1]), z, 3, angle[team-1]);
} while (ThingCount(T_NONE, 3) == 0);
Teleport(3);
I know that TeleportDest is a legal Thing name because otherwise the while loop would repeat forever and ZDoom would report a runaway script.[/EDIT]
welll, the last argument should be fixed.. but if it's not zero the message should still leave eventually.. o.o;HotWax wrote:Ummm... Why is this line causing a message that never leaves the screen?
Also tried with the last argument set to 2 and 0.01, no change.Code: Select all
HudMessageBold(s:"Team ", d:team, s:" now has ", d:count[team-1], s:" players."; 0, 0, -1, 0.0, 0.0, 10);
Lost Souls act as projectiles while they're attacking, so they don't just stop dead if you deactivate them. They ought to not attack AGAIN after that, though. You could try giving another line just in front of that one some id; then after you assign the Lost Soul an id and deactivate it, make the second line block everything, wait a moment for it to hit the wall, and then make the wall passable again..HotWax wrote:Also, can Lost Souls not be deactivated? I give one a TID as it flies across a line, and then deactivate that TID, but it contines attacking etc. I can tell that the TID stuck because further activations of that line don't work (I have the script set to skip the rest of the code if the actor already has a TID). Maybe just while they're attacking?
...that one I have no idea. Try spawning a MapSpot instead?HotWax wrote:Tell me why this isn't teleporting the activator:
