Slothman/Zombies: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 19: Line 19:
'''Helmet Zombies:'''
'''Helmet Zombies:'''
zombie + helmet = big trouble! no headshots against these flesheaters.
zombie + helmet = big trouble! no headshots against these flesheaters.
'''Choose your apocolypse:'''
server option allows you to choose between allowing zombies to spawn anywhere, only at certain spawnpoints, or only when a script tells it to
'''EDF:'''
lets map designers pick where zombies spawn when that method of creating zombies is chose


=Server Events=
=Server Events=

Revision as of 09:21, 16 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.

Choose your apocolypse: server option allows you to choose between allowing zombies to spawn anywhere, only at certain spawnpoints, or only when a script tells it to

EDF: lets map designers pick where zombies spawn when that method of creating zombies is chose

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 zombie 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 zombie
  • y: The y co-ordinate to spawn the zombie
  • z: The z co-ordinate to spawn the zombie

Optional Arguments

  • rotation: Rotation of the ombie on spawn
  • skinID: skin on spawn
  • interior: Interior the zombie will spawn into
  • dimension: The ID of the dimension that the zombie 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