• 0

    posted a message on [Trigger] Custom Inventory

    @Zanryu1337: Go

    Thanks got it to work. I had to place it at the top of actions though. Is that because of the break action? I still don't quite get what that one does.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Custom Inventory

    @Zanryu1337: Go

    I've been trying last night and this morning to get this thing to stop looping but it loops 14 times (one for every slot in my inventory) with the else statement. And now when I pick up an item and have free room it runs the else statement one time before it proceeds with normal item pickup.

    Actions
    General - For each integer Free Inventory Slot from 1 to 15 with increment 1, do (Actions)
    Actions
    General - If (Conditions) then do (Actions) else do (Actions)
    If
    Inventory Slot Button Item[Free Inventory Slot] == ""
    Free Inventory Slot <= 14
    Then
    General - Break
    Else
    Dialog - Create a Modal dialog of size (600, 300) at (20, 20) relative to Top Right of screen
    Dialog - Create a label for dialog (Last created dialog) with the dimensions (500, 200) anchored to Top Left with an offset of (30, 30) with the text "You cannot carry any more items." color set to White text writeout set to false with a writeout duration of 1.0
    Dialog - Show (Last created dialog) for (All players)
    General - Wait 0.2 Game Time seconds
    Dialog - Hide (Last created dialog) for (All players)
    Variable - Set True Item Name = (String(Healing Potion TEST Instant))
    Variable - Set Item Name = "Potion"
    General - If (Conditions) then do (Actions) else do (Actions)
    If
    And
    Conditions
    Free Inventory Slot != 0
    Free Inventory Slot < 15
    Then
    Variable - Set Inventory Slot Button Item[Free Inventory Slot] = True Item Name
    Dialog - Set Inventory Slot Button[Free Inventory Slot] tooltip to "Food" for (All players)
    Dialog - Set Inventory Slot Button[Free Inventory Slot] text to (Text(Item Name)) for (All players)
    Dialog - Create a Modal dialog of size (600, 300) at (20, 20) relative to Top Right of screen
    Dialog - Create a label for dialog (Last created dialog) with the dimensions (500, 200) anchored to Top Left with an offset of (30, 30) with the text "Ness dug around in the dumpster and..." color set to White text writeout set to true with a writeout duration of 1.0
    Dialog - Set transparency of (Last created dialog) to 10.0
    Dialog - Show (Last created dialog) for (All players)
    Region - Move Dumpster1 to Graveyard
    General - Wait 3.0 Game Time seconds
    Region - Move Dumpster1Used to Dumpster1
    Dialog - Hide (Last created dialog) for (All players)
    Else

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Custom Inventory

    @Zanryu1337: Go

    I have a 14 slot inventory and both were changed to 14. I also up'd the number in the actions. Maybe I messed up something there for the pickup. Here's my current pickup trigger. I want to add an action when your inventory is full and you try to pickup an item.

    Dialog - (Check()) is used by Player Any Player with event type Clicked
    Local Variables
    Free Inventory Slot = 1 <Integer>
    True Item Name = "" <String>
    Item Name = "" <String>
    Conditions
    And
    Conditions
    (Used dialog item) == Check Button
    (Jim Raynor (Commando) [33.28, 40.81] is in Crate1) == true
    Actions
    General - For each integer Free Inventory Slot from 1 to 15 with increment 1, do (Actions)
    Actions
    General - If (Conditions) then do (Actions) else do (Actions)
    If
    Inventory Slot Button Item[Free Inventory Slot] == ""
    Then
    General - Break
    Else
    Variable - Set True Item Name = (String(Pickup - Cracked Rifle))
    Variable - Set Item Name = "Cracked Rifle"
    General - If (Conditions) then do (Actions) else do (Actions)
    If
    And
    Conditions
    Free Inventory Slot != 0
    Free Inventory Slot < 15
    Then
    Variable - Set Inventory Slot Button Item[Free Inventory Slot] = True Item Name
    Dialog - Set Inventory Slot Button[Free Inventory Slot] tooltip to "Weapon" for (All players)
    Dialog - Set Inventory Slot Button[Free Inventory Slot] text to (Text(Item Name)) for (All players)
    Dialog - Create a Modal dialog of size (600, 300) at (20, 20) relative to Top Right of screen
    Dialog - Create a label for dialog (Last created dialog) with the dimensions (500, 200) anchored to Top Left with an offset of (30, 30) with the text "Ness opened the crate and found a c..." color set to White text writeout set to true with a writeout duration of 1.0
    Dialog - Show (Last created dialog) for (All players)
    General - Wait 3.0 Game Time seconds
    Dialog - Hide (Last created dialog) for (All players)
    Animation - Remove Any doodads in the Crate1 region
    Region - Move Crate1 to Graveyard
    Trigger - Turn (Current trigger) Off
    Else

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Custom Inventory

    One more question then I'm done with the inventory lol. How do I make a message appear if you try to pick up an item when the inventory is already full? I tried putting it under the else's and it didn't work. Then I tried making a separate trigger but wasn't sure of the conditions. I switched the one from item pickup to "Free inventory slot >" but that didn't work either.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Custom Inventory

    Thank you sir. I changed that because it wasn't showing my item name on the button but was instead showing the original text of the item name. I fixed it though. Created a second variable for item name which is only used to change the text on the button and has my custom text.

    Posted in: Tutorials
  • 0

    posted a message on Request for Raynor repaint (Ness from Earthbound and Smash Bro)

    Just clarifying this is still a request.

    Posted in: Requests
  • 0

    posted a message on [Trigger] Custom Inventory

    Luckily I was building it in your tutorial map before loading in my map so it should be easier to find the problem. It's a recreation of the SNES game Earthbound so the system is you hit the check button when near the item to pick it up. Goods is the inventory button. Thanks for helping us all with this inventory. Here is the edited map.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Custom Inventory

    I'm having a problem with using the inventory item. It might have been because I have modified the system quite a bit to show no pictures and only text for items. Anyways the game is not recognizing option 1 from the drop down list. I narrowed it down to this:

    General - Switch (Actions) depending on Inventory Slot Button Item[Clicked Button]
    Cases
    General - If ((String(Healing Potion TEST Instant)))

    This seems to be the problem. Anything I can change it to?

    Posted in: Tutorials
  • 0

    posted a message on [Solved] Inventory system. Help! Where do I start?

    The tutorial did it. Got my text only inventory working thanks.

    Posted in: Triggers
  • 0

    posted a message on Help for beginner with switch statement/region

    I am setting up a lot of regions where if you click a button it picks up an item in that region and puts in your inventory if you are standing next to the item. I came up with individual triggers and it works fine but I'm worried it will lag so I wanted a switch statement. I'm still new but I noticed other people use switch statements so I'm guessing it's to help with lag or maybe just clean up mass triggers. I can't find a switch statement for what region your hero is in. The closest I got were center of region and point but those are too specific of a position and aren't working. Would a switch statement even be necessary? Or should i stick with my current trigger for every item with event: dialogue button pressed and condition: unit in region.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Inventory system. Help! Where do I start?

    I am wanting to display an inventory with my UI hidden. I created a new UI with dialogs. My map also uses wasd movement and has smart click turned off (dunno if that matters or not but it might with the default inventory). I have the data inventory but I cannot get that to display without displaying the default UI. What I would like is a dialog inventory that shows text only (name of the item on a dialog button. no pictures). I would settle with the normal inventory I have if I can display that with the rest of the UI still hidden and the unit not normally being selected (maybe selected through triggers?). I am a beginner and having a lot of trouble picking this up. If anyone could guide me to which way will work better and possibly to a good tutorial it would be very appreciated.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Protoss energy lines not working?

    Working great thanks for help guys.

    Posted in: Terrain
  • 0

    posted a message on [Solved] Protoss energy lines not working?

    None of its features were messed with. I'm not sure what 'set game view' is. I used the previewer and the animation shown is how it is in the game...with no animation. So the only place I'm seeing an animation is in the editor actual placed on the map. This doodad has a very important place in my map. Is yours showing no animation or is it just mine?

    Posted in: Terrain
  • 0

    posted a message on [Solved] Protoss energy lines not working?

    Restarted and still showing fine in the editor but not in game. In the game I still see the decal just not the moving lines.

    Posted in: Terrain
  • 0

    posted a message on [Solved] Protoss energy lines not working?

    In the editor they are animated but when I test document they do not have the moving lines. I have my graphics set to max settings. Anyone else seeing this?

    Posted in: Terrain
  • To post a comment, please or register a new account.