Page 1 of 6
Mappers, put your thinking caps on
Posted: Wed Feb 11, 2004 6:01 pm
by HotWax
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?
Posted: Wed Feb 11, 2004 6:15 pm
by Eevee
Uhm, I don't think there's really any way to capture manual summons...
Posted: Wed Feb 11, 2004 6:26 pm
by Graf Zahl
If you mean the console command 'summon': no chance.
Posted: Wed Feb 11, 2004 8:20 pm
by HotWax
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?
Posted: Wed Feb 11, 2004 8:37 pm
by Cyb
you can set the tid of something:
Code: Select all
script 1 (void)
{
if(activatortid() == 0)
thing_changetid(0, newtid);
}
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)
Posted: Wed Feb 11, 2004 10:04 pm
by Eevee
There's a function called activatortid()? o.o
er, anyway.. yes, you can detect when something (at ALL) enters the map, but you can't tell how it got there or what it is.
Perhaps.. an Actor Hits Floor would be useful?
Posted: Thu Feb 12, 2004 12:21 am
by HotWax
Cyb wrote:but why not just have the player hit a switch that spawns a monster instead of summon
Because that limits what the player can bring into the arena.
Eevee wrote:Perhaps.. an Actor Hits Floor would be useful?
THANK YOU EEVEE! I LOVE YOU!!!!
/me runs off to experiment.
Posted: Thu Feb 12, 2004 12:34 am
by HotWax
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]
Posted: Thu Feb 12, 2004 12:44 am
by Eevee
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.
HotWax wrote:THANK YOU EEVEE! I LOVE YOU!!!!
Should I be scared when naked people say this to me?
Posted: Thu Feb 12, 2004 12:51 am
by HotWax
/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]
Posted: Thu Feb 12, 2004 1:03 am
by Eevee
Does an Actor Hits Floor work if you summon the monster in the air? I know this wouldn't help too much, I'm just curious (and lazy).
Posted: Thu Feb 12, 2004 1:04 am
by Mundungu
Don't feel too bad... I've got a spot in my map when enemies break through the ceiling and drop around the player to attack... fortunately when this happens, the player won't be looking in that direction, otherwise the player would notice just how stupid it actually looks.
Posted: Thu Feb 12, 2004 1:05 am
by HotWax
It works even if the monster is summoned on the ground, but it doesn't work with flying monsters.
[EDIT]How do the Boom point pushers and pullers work? I set a sector to allow pushers, and put a pusher in the sector, and nothing happens. Eh?[/EDIT]
Posted: Thu Feb 12, 2004 1:46 am
by HotWax
Ummm... Why is this line causing a message that never leaves the screen?
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 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:
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'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]
Posted: Thu Feb 12, 2004 2:10 am
by Eevee
HotWax wrote:Ummm... Why is this line causing a message that never leaves the screen?
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 tried with the last argument set to 2 and 0.01, no change.
welll, the last argument should be fixed.. but if it's not zero the message should still leave eventually.. o.o;
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?
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:Tell me why this isn't teleporting the activator:
...that one I have no idea. Try spawning a MapSpot instead?
