• The forum has been updated. For an explanation of some of the changes, head over here.

Custom Scene Props/Buttons

Currently viewing this thread:


I know I have been posting a lot of questions on these forums recently, so sorry for that. But it would be really helpful if someone could help me with this. :smile:

I noticed that the new NW patch 1.2 allows you to create custom buttons, and custom scene props....which you can apparently make visible to clients on your server. My aim is to be able to create a button or scene prop which will let you spawn in an item (and works on a server without the client dowloading a separate mod). I have located this section in sceneprops.py.......Which appears to be explaining how to create these buttons. And then below are the actual buttons/props.

("custom_button_instant",spr_use_time(0),"0","cannon_button_collision", [
    [        #add custom server side code here..
        #  # Example: doing different things based on value of button's var2 as set in scene editor
        #  # (store_trigger_param_2, ":instance_id"),
        #  # (prop_instance_get_variation_id_2, ":button_type", ":instance_id"),
        #  # (try_begin),
        #  #  (eq, ":button_type", 1),
        #  #      (do_stuff),
        #  # (else_try),
        #  #  (eq, ":button_type", 2),
        #  #      (do_other_stuff),
        #  # (try_end),

To begin with, I am unsure what the 'custom server side code' is....but am guessing it may be responsible for making the new button/scene prop show up for clients.

Also, I am unsure what the "0", in the top line is for. It only seems to cause errors when compiling the module.

Other than that I would really just appreciate any advice on how to turn that code into something that will spawn in an item (similar to ze_treasure)--and can be uploaded to my server for clients to use.

I have experimented with a few things, and found nothing at all shows up when i enter my server. #NOTE: my server is not hosted on my computer, but through a web host Oasishosting. #Also Note: I have only been changing the sceneprops.txt file on my server, since that is the one I edited. I'm not sure if you have to change more than just that file to make it work.
I realize most modders are pretty busy, but if anyone could point me in the right direction on at least one of these questions I would be hugely grateful.

Top Bottom