Jump to content

Trying to get a cloud of spawned monsters to work


Rorix

Recommended Posts

I don't have much experience with scripting, but I think that it should be working. The script is designed to spawn 100 shades (I made them able to fly), pushing them each in a random direction. Ideally, they would spawn at a vertical angle, but I don't know how to do that. Thus far, the script spawns only 1 monster. Any help would be appreciated. The script is written below.

 

#include "zcommon.acs"

int shadecount = 0;
int direction = 0;

script 1 (void)
{
    until(shadecount > 99)
    {
        direction = (random(45, 135));
        shadecount++;
        spawnspot("NIGHTSHADE", 1, shadecount, 90);
        thrustthingz(shadecount, 40, 0, 0);
        delay(10);
        thrustthing(direction, 20, 0, shadecount);
        delay(20);
    }
}

Share this post


Link to post

I suppose your spawning spot has TID 1 (since I can see you spawn the Shades at spot with TID 1)... so it gets thrusted along with the first Shade (when "shadecount" is 1).

The spot is probably something that ignores most collision physics and it won't be affected by gravity thus it will end up in some invalid position for spawning after the thrust (like inside the ceiling or a wall).

 

 

Also keep in mind that ACS uses byte angles (0-255), not degrees.

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...