Slothman/Zombies: Difference between revisions
(Created page with 'This is a resource designed spawn the undead wherever a player roams outside. It works without any configuration or scripting skills needed, but there are a few option for gamemo…') |
|||
Line 17: | Line 17: | ||
This script provides several functions and events to allow other resources to see and control the zombies | This script provides several functions and events to allow other resources to see and control the zombies | ||
'''Helmet Zombies:''' | |||
zombie + helmet = big trouble! no headshots against these flesheaters. | |||
=Server Events= | =Server Events= |
Revision as of 02:33, 12 July 2010
This is a resource designed spawn the undead wherever a player roams outside. It works without any configuration or scripting skills needed, but there are a few option for gamemode designers to use.
Features
Skins: There have been many contributed skins that change peds to look like the rotting/gory undead
Semi-intelligence: Zombies are fairly mindless by nature, but they do have basic motor skills like being able to jump over objects, climb ledges, walk around corners, and break through barriers
Behaviour: Zombies endlessly attack any player or ped that isn't one of them, then feast briefly on the remains before wandering off in search of more flesh
Streaming: By default, anywhere a player goes outside will have a fairly dense population of zombies. this is done by deleting zombies that far away and spawning new ones within a close radius of the players.
Gamemode/Script integration: This script provides several functions and events to allow other resources to see and control the zombies
Helmet Zombies: zombie + helmet = big trouble! no headshots against these flesheaters.
Server Events
onZombieSpawn
This triggers when a Zombie is streamed in automatically. It is a cancellable event, so scripts and gamemode can prevent zombies from spawning in certain areas.
Parameters
float x, float y, float z
- x: The X coord of the spawn location
- y: The Y coord of the spawn location
- z: The Z coord of the spawn location
Source
The source of this event is the Zombie that is spawning
onZombieWasted
This triggers when a bot is killed. Parameters
element attacker, float weapon, float bodypart
- attacker: The Element that killed the zombie
- weapon: The weapon id used to kill the zombie
- bodypart: The bodypart id that was hit to kill the zombie
Source
The source of this event is the zombie that died
Server Functions
All of these funtions will have to be used through the call function, otherwise they won't work
createZombie
This function spawns a zombie ingame, will return the zombie element, or false if there was a problem.
Syntax
element createZombie( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0 ] )
Required Arguments
- x: The x co-ordinate to spawn the bot at
- y: The y co-ordinate to spawn the bot at
- z: The z co-ordinate to spawn the bot at
Optional Arguments
- rotation: Rotation of the bot on spawn
- skinID: Bots skin on spawn
- interior: Interior the bot will spawn into
- dimension: The ID of the dimension that the bot should be in
isPedZombie
returns true if the ped is a zombie, false otherwise
Syntax
bool isPedZombie( element thePed)
Required Arguments
- thePed: The ped you want to check if its a zombie
Credits
- Slothman: Creator/scripter/skin artist
- Various artists: see the client script to view zombie skin creators.
- Thanks to Everyone else who made suggestions, tested the script, helped when i was stuck, etc