1. Hey! Guest! The 34th GMC Jam will take place between August 22nd, 12:00 UTC (Thursday noon) and August 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Item won't create

Discussion in 'Programming' started by Meowmere, Jul 16, 2016.

  1. Meowmere

    Meowmere Guest

    In my inventory each button can create a sensor object, Z X and C
    and there is 3 items that are in the inventory
    each item has a code like this
    they seem to change the stats with no problem but I want it to create the other 2 swords if the player had one of them equipped.
    I store the variable for sword data in obj_player_stats
    This is for sword2

    with (obj_player_stats) {
    attack =3;
    if sword =1 {
    sword =2
    instance_create (x,y,obj_sworditem)
    }
    if sword =3 {
    sword =2
    instance_create (x,y,obj_sword3item)
    }
    }
     
  2. studio furukawa

    studio furukawa Member

    Joined:
    Jun 22, 2016
    Posts:
    115
    try to debug inside each obj_sworditem by placing show_debug_message("sword item created"), other then that we need more code to work with.
     
    jazzzar likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice