Whats wrong with this script? Spawning question.

Talk about editing and creation of Vavoom mods

Whats wrong with this script? Spawning question.

Postby gunrock » 28 Feb 2009 22:44

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));
}
User avatar
gunrock
 
Posts: 175
Joined: 09 Oct 2002 02:19

Re: Whats wrong with this script? Spawning question.

Postby Firebrand » 01 Mar 2009 04:31

AFAIK, GetActorX, Y and Z aren't supported ACS commands :? .
User avatar
Firebrand
 
Posts: 1000
Joined: 11 Feb 2004 08:12
Location: Mexico

Re: Whats wrong with this script? Spawning question.

Postby Janis Legzdinsh » 01 Mar 2009 11:15

It won't be visible to the player. You should spawn it in front of the player.
User avatar
Janis Legzdinsh
Site Admin
 
Posts: 1952
Joined: 13 Jan 2002 08:30
Location: Limassol, Cyprus

Re: Whats wrong with this script? Spawning question.

Postby Janis Legzdinsh » 01 Mar 2009 11:17

Firebrand wrote:AFAIK, GetActorX, Y and Z aren't supported ACS commands :? .

They are supported.
User avatar
Janis Legzdinsh
Site Admin
 
Posts: 1952
Joined: 13 Jan 2002 08:30
Location: Limassol, Cyprus

Re: Whats wrong with this script? Spawning question.

Postby Karnizero » 01 Mar 2009 23:08

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.
User avatar
Karnizero
 
Posts: 208
Joined: 27 Dec 2007 11:52
Location: Madrid - Spain

Re: Whats wrong with this script? Spawning question.

Postby Crimson Wizard » 02 Mar 2009 00:28

Karnizero wrote: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.


Karnizero wrote: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.
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: Whats wrong with this script? Spawning question.

Postby Karnizero » 02 Mar 2009 09:02

Karnizero wrote: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.[/quote]

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:

Code: Select all
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.
User avatar
Karnizero
 
Posts: 208
Joined: 27 Dec 2007 11:52
Location: Madrid - Spain


Return to Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron