Scripts / I'm stuck on this script (Trying to assign health and a sound to a entity)

Author
Message
SS slothman
10
Years of Service
User Offline
Joined: 5th Nov 2014
Location: UK
Posted: 22nd Jun 2016 10:29
Hi guys, I've been working on this script and it works fine, the entity moves towards the player and damages him when in range, however I can't seem to add anything else to the script without getting an error message in gameguru or causing the script to stop working entirely. I want to set collision on in the script and give the entity health (so that it's killable by the player) and to set a 3d sound to it, any help would be appreciated.

PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Jun 2016 15:50 Edited at: 23rd Jun 2016 00:55
If it's a non character entity then to move a non-character entity the collision has to be off, so the only way to do it would be turn it off, move it, turn it on, this would cause the entity to flicker and stutter.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 23rd Jun 2016 00:09
In fpe:

collisionmode = 0

In properties of sprite:

Physics On? No
Strength 25 (or whatever)



Don't know what you want to happen when it's hit or 'dies' - this just removes it when health/strength below zero and plays a sound if there is one in slot zero.

Cheers.


SS slothman
10
Years of Service
User Offline
Joined: 5th Nov 2014
Location: UK
Posted: 23rd Jun 2016 11:21
Thanks very much, I'll test the script you've provided and get back to you.
PM

Login to post a reply

Server time is: 2024-12-22 18:34:31
Your offset time is: 2024-12-22 18:34:31