Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Lightswitch (RPG svn)

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie

Lightswitch (RPG svn)

Post by wildflower »

Anyone have an idea how to make a "simple" lightswitch in RPG-mode?

I need to light a torch, using interact, I was planning to use the /packages/models/objects/torch_cold and then spawn some flames and some light.

A more simple approach would be to somehow switch the "torch_cold" model with "torch" and use r_status_addlight, this did worked with the 2.6 version, but I can't make it work in 2.7 (svn).

I have tried every hack I could think of, so any hints would be helpfull :)
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Lightswitch (RPG svn)

Post by Hirato »

As far as I know, that functionality didn't exist in 2.6.0 or 2.6.1 either.
When torches like that would be functional, I would advise against this.
Players may turn off dynlights and there's a limit of 5

You can currently switch the model though, though you cannot play with the active effects

Code: Select all

r_script_signal "interact" [
    r_select_trigger self [
        if (strcmp (r_trigger_mdl_get) "torch_cold") [
            r_trigger_mdl torch
            //add light here - when it's functional
        ] [
            r_trigger_mdl "torch_cold"
            //remove light here - when it's functional
        ]
    ]
]
What I would do though is to give the player a torch or light spell to play with
This is not a url, clicking it is pointless
User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie

Re: Lightswitch (RPG svn)

Post by wildflower »

In 2.6.1 I made a hack where I equipped a mdlscale 1 rat with an item that had status_addlights, and spawned it right above the torch when I triggered it.
A little messy I know, but I was just playing around to see what could be done ;)

I didn't however know that there was a limit of 5 on dynlights, so that kind'a spoils my plans for a quest, it could still work with a light spell thou...
nice idea 8-)
Locked