Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
onDie is a hook of Health componet, not the monster itself as far as I remember so you should probably look there.
:EDIT: mobile speling, lol
:EDIT: mobile speling, lol
Last edited by Blichew on Sun Nov 09, 2014 6:16 pm, edited 1 time in total.
Re: Ask a simple question, get a simple answer
Use addConnector("onDie", "yourscript","yourfunction")The cube wrote:How to add a ondie hook to a monster spawned by a script?
Re: Ask a simple question, get a simple answer
What is the difference between swamp water, surface water, and underground water?
Re: Ask a simple question, get a simple answer
different colour.Jackard wrote:What is the difference between swamp water, surface water, and underground water?
how do i get a spell launcher to fire a spirit relay bolt also whats the entity name i need to put in a receptor to be triggered by a spirit relay bolt
- QuintinStone
- Posts: 72
- Joined: Sat Nov 01, 2014 9:58 pm
Re: Ask a simple question, get a simple answer
Question: I thought I saw a thread where a defineObject block was posted for a single example of each object type; can anyone help me find it?
Re: Ask a simple question, get a simple answer
They all seem to be the same color in my preview? Maybe my graphics options are not set high enough?Karinas23 wrote:different colour.Jackard wrote:What is the difference between swamp water, surface water, and underground water?
Re: Ask a simple question, get a simple answer
You have to program it to shoot via script i believe. Everything is there entity wise, you just have to script the shot.Karinas23 wrote:how do i get a spell launcher to fire a spirit relay bolt also whats the entity name i need to put in a receptor to be triggered by a spirit relay bolt
The entity will be the spell that will trigger the receptor. aka: dark_bolt, poison_bolt, etc. Works just like keys and locks with doors.
Re: Ask a simple question, get a simple answer
On the surface, they might, but hop into them. You'll see a difference.Jackard wrote:They all seem to be the same color in my preview? Maybe my graphics options are not set high enough?Karinas23 wrote:different colour.Jackard wrote:What is the difference between swamp water, surface water, and underground water?
underground water: lagoon clear on top and underneath.
surface water: blue on top, blue underneath with some limited visibility.
swamp water: blueish green on top, green underneath with fairly limited visibility.
Re: Ask a simple question, get a simple answer
Maybe someone can shed some light for me:
I'm trying spawn a bunch of Mobs and give each of them some custom properties. I got everything set up and ready to go, but one minor problem is stopping me from completing my script: I can't seem to use a variable in place of the actual entity ID.
ex:
It keeps saying that "attempt to call method 'getHealth' (a nil value) x" which to me means that it's not recognizing the variable as representing the mob ID. I've seen other scripts use a variable in place of an ID, but I seem to be missing something. I'm going to be using an array for naming the mobs, so it's important to me that I use a variable in place of the actual name so I can spam-run the same script section to make my script file smaller.
I'm trying spawn a bunch of Mobs and give each of them some custom properties. I got everything set up and ready to go, but one minor problem is stopping me from completing my script: I can't seem to use a variable in place of the actual entity ID.
ex:
Code: Select all
function makeamummy()
spawn("mummy", ........., "Mob_1")
local var = "Mob_1.monster"
Mob_1.monster:setLevel(3) --This works
var:setLevel(3) --This won't
end
Re: Ask a simple question, get a simple answer
findEntity is your friend.
Code: Select all
function makeamummy()
local var = spawn("mummy", ........., "Mob_1")
--local var = "Mob_1.monster" -- no need for this
Mob_1.monster:setLevel(3) --This works
--var:setLevel(3) --This won't
var.monster:setLevel(3)
--and you can do:
local obj = findEntity("Mob_1")
obj.monster:setLevel(3)
-- also you can spawn somthing and get the unique id automatcally by not naming the object
-- local obj2 = spawn("mummy",.........)
-- and then store obj2.id
end
Links to my YouTube playlist of "tutorials" and to my forum thread.