Back to the Vavoom Forum Archives


Forum

Whats wrong with this script? Spawning question.

Sat, 28 Feb 2009 22:44:23

gunrock

Okay, I set up this script in which I want to spawn a teleport fog effect around each individual player when the map starts(similiar to Quake 3 Arena effects. However, nothing happens. What corrections are needed? Here is the script code: #include "vcommon.acs" script 200 enter // enter scripts run every time a player first spawns (not on respawns) { Spawn("TeleportFog", GetActorX(0), GetActorY(0), GetActorZ(0)); }
Sun, 01 Mar 2009 04:31:43

Firebrand

AFAIK, GetActorX, Y and Z aren't supported ACS commands <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> .
Sun, 01 Mar 2009 11:15:28

Janis Legzdinsh

It won't be visible to the player. You should spawn it in front of the player.
Sun, 01 Mar 2009 11:17:46

Janis Legzdinsh

[quote="Firebrand":bf73t53p]AFAIK, GetActorX, Y and Z aren't supported ACS commands <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> . They are supported.
Sun, 01 Mar 2009 23:08:54

Karnizero

I also noticed that Spawning process does not work when the spawned actor is over another existing actor, for example, trying to summon an Imp in a position occuped by another imp. At first time, it seems that the old Imp will be "telefragged" OR the two imps would be stuck and none of them killed. Same occurs for any actor, even if the actual coordinates are occuped by actors such as "blood pool", "bloody mess", etc... That can be annoying when we have scripts awaiting for the player to kill a certain amount of monsters, and some of them never spawns due to this issue. But this also happens on other source ports. I remember some time ago, i made a script to spawn monsters, and Crimson Wizard or Firebrand (i don't remember) show us a way to check if the monster could be spawned or not.
Mon, 02 Mar 2009 00:28:56

Crimson Wizard

[quote="Karnizero":1xsbf34o]I also noticed that Spawning process does not work when the spawned actor is over another existing actor, for example, trying to summon an Imp in a position occuped by another imp. <...> But this also happens on other source ports. AFAIK this also happens in original Hexen. [quote="Karnizero":1xsbf34o]I remember some time ago, i made a script to spawn monsters, and Crimson Wizard or Firebrand (i don't remember) show us a way to check if the monster could be spawned or not. I don't remember if this is possible in ACS, so happened I didn't used map scripts for quite a while. I know only a way to do this in progs, but I doubt this fits the task.
Mon, 02 Mar 2009 09:02:58

Karnizero

[quote="Karnizero":2ltyzzln]I remember some time ago, i made a script to spawn monsters, and Crimson Wizard or Firebrand (i don't remember) show us a way to check if the monster could be spawned or not. I don't remember if this is possible in ACS, so happened I didn't used map scripts for quite a while. I know only a way to do this in progs, but I doubt this fits the task. If "Spawn( )" function returns any kind of value (true/false, 0/1, or other), checking if the actor was spawned shouldn't be hard. Something like this could be usefull:
myVariable = Spawn("TeleportFog", GetActorX(0), GetActorY(0), GetActorZ(0));

if (myVariable == false)
{
//wait some seconds, and try spawning again
}

//exit script
I didn't tested, but, in theory, that should work.

Back to the Vavoom Forum Archives