Mivalekan Posted June 21, 2005 Ok, I just don't understand this script. I've read over all the tutorials and whatnot I could find, and look through the scripts of several maps, but STILL don't understand how this script works. I know that I need the Mapspot thing where the thing will spawn, but the script has me baffled. Here's an example of what I mean from one of AgentSpork's maps: Thing_SpawnFacing(14,T_IMP,0,101); T_IMP is obviously the thing ID I need, but why the 14? Sector Tag? What? I don't see any link whatsoever to the script and the mapspot, yet things stlil spawn. 0 Share this post Link to post
Ichor Posted June 21, 2005 It works like this: Thing_SpawnFacing(A, B, C, D); A is the mapspot where the thing appears. If you look around enough, you'll find the mapspot with a tag of 14. That's where the thing will appear. B is the number or name of the thing that will appear. C is either 0 or 1, and that determines whether it uses the green spawn effect or just appear silently. D will be the tid number of the thing that just spawned. 0 Share this post Link to post
Mivalekan Posted June 24, 2005 Ichor said:A is the mapspot where the thing appears. If you look around enough, you'll find the mapspot with a tag of 14. That's where the thing will appear. Uhh... what? 0 Share this post Link to post
Graf Zahl Posted June 24, 2005 In Hexen format maps you can give id's to things. That's what is needed here. 0 Share this post Link to post
Mivalekan Posted June 24, 2005 I have it set to Doom (Doom in Hexen format), considering this one of the only formats I can script in. 0 Share this post Link to post
Graf Zahl Posted June 24, 2005 Mivalekan said:I have it set to Doom (Doom in Hexen format), considering this one of the only formats I can script in. That's the same. Somewhere in the things properties dialog you should find a field called 'tid', 'tag' or something similar. There you must enter the value. 0 Share this post Link to post
Mivalekan Posted June 24, 2005 Wow, I've NEVER noticed that second tab. 0 Share this post Link to post
Mivalekan Posted June 24, 2005 Is there a way to set it to spawn monsters as I enter a sector? This is how my current script is set up: script 2 (VOID) { //Monster Spawn - Red Key ACS_Execute (2, 0); Thing_SpawnFacing (1, T_HELLKNIGHT, 1, 102); } It doesn't work yet, because evidentally I'm missing something. ;/ 0 Share this post Link to post
Graf Zahl Posted June 24, 2005 Mivalekan said:Is there a way to set it to spawn monsters as I enter a sector? This is how my current script is set up: script 2 (VOID) { //Monster Spawn - Red Key ACS_Execute (2, 0); Thing_SpawnFacing (1, T_HELLKNIGHT, 1, 102); } It doesn't work yet, because evidentally I'm missing something. ;/ First, starting script 2 from script 2 is redundant and won't do anything. Second, if it doesn't work it doesn't need to be the script's fault. Are you sure you set the linedef correctly so that the script gets started? Or did you assign this to a thing? The least I need to know is how you intend to start it before I can help you. 0 Share this post Link to post
Mivalekan Posted June 24, 2005 This is what I want to happen: The player enters some sector which contains some item, which sets off the script that spawns 4 monsters which surround the player. (Cliche script, but oh well. :D ) 0 Share this post Link to post
Negatronica Posted June 24, 2005 You'll need 4 map spot things with a tid of 1 according to the below example. The monsters will teleport to those map spots. I don't think they have to be map spots though, any thing with a tid of 1 will have monsters spawn on them. Mivalekan said:script 2 (VOID) { //Monster Spawn - Red Key ACS_Execute (2, 0); Thing_SpawnFacing (1, T_HELLKNIGHT, 1, 102); } 0 Share this post Link to post
Graf Zahl Posted June 24, 2005 Mivalekan said:This is what I want to happen: The player enters some sector which contains some item, which sets off the script that spawns 4 monsters which surround the player. (Cliche script, but oh well. :D ) In that case it is best to assign the action to the item itself. Just set its special to start script 2 and as long as the map spots with the correct tid are there it should work. 0 Share this post Link to post