dim3 Forum

Full Version: Does this work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
DIM3_EVENT_COLLIDE
{
sound.play("sound",obj.position.x,obj.position.z,obj.position.y,1);
}

I might ask more stuff but for now I need to know how the event constants
work.
You need to include this into the event function.
Code:
function event(obj,mainEvent,subEvent,id,tick)
{
    switch (mainEvent) {
        case DIM3_EVENT_COLLIDE:
            sound.play("sound",obj.position.x,obj.position.z,obj.position.y,1);
            return;
        }
}

If your script is based on one of the Dim3 demo scripts, there should already be an event function at the bottom. Just add the COLLIDE even and you're done.
And before asking "Will this work?" the next time, just try it. It's not going to kill you. Smile
Bink Wrote:You need to include this into the event function.
Code:
function event(obj,mainEvent,subEvent,id,tick)
{
    switch (mainEvent) {
        case DIM3_EVENT_COLLIDE:
            sound.play("sound",obj.position.x,obj.position.z,obj.position.y,1);
            return;
        }
}

If your script is based on one of the Dim3 demo scripts, there should already be an event function at the bottom. Just add the COLLIDE even and you're done.
And before asking "Will this work?" the next time, just try it. It's not going to kill you. Smile

Maybe it'll erase his hard drive Myth2 v1.0 style. :P
Ok thanks bink.
Where would this code go?
Patrick the questions already answered, it doesn't work you have to call it from the main event when you get that message Wink.
I know the questions answered! but where would this script go?
–PatrickA
Reference URL's