Vati-nyan's Recent Forum Activity

  • Just edit your first post, you can change the topic title there.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just make the menu on a different layer. When P is pressed, use the 'time scale' function to pause (set it to 0), and make the menu layer visible. When escape is pressed, the layer turns invisible again and time scale should be set back to 1.0. You'll be back where you started.

  • You know, suddenly I feel really dumb...

    You see I already used that method one time before, but somehow it completely slipped my mind <_< Thanks for reminding me...

  • I'm back to ask for assistance!

    This one is pretty simple. I need to be able to bring up a menu on a button click and then close it again with that same button. One example is bringing up a menu with 'escape'. Another is bringing up a message box with 'enter' and then either proceed the message or close the box with another 'enter' press.

    Thing is that this only works if I can press that button insanely fast, or the program will start it all over, and I'm stuck in my menu. The only thing I found on the forum about this was to try inputting "trigger once" as a condition, but this doesn't seem to make any difference for me. Not as a condition, and not as a sub-event.

    I even tried inputting a "wait X ms" before the action is carried out, but that didn't work either!

    There must be some way to work around this?

  • I usually make a layout solely for storing global objects. That could be one way of avoiding you problem maybe - store them in a layout the player will never see, and then create/destroy them on screen whenever they are needed?

    Maybe I am wrong and you need something completely different

  • Finally back...

    I tried what you said and used "else", but it still doesn't work. Here is example cap I made of it all:

    http://www.mediafire.com/?3jc0g4uv4amzuye

    I'm a bit hopeless in trying to built this character menu. If anyone has any suggestions for better ways of doing it, I'd be interested of course.

    The "member number" variable is intended to be used in the menu as well, so that construct remembers which member was clicked, and opens a new menu accordingly. At least that's the plan...

    Edit: Oh my... I tried thinking of how to do this from the very bottom, and have found a different way that actually works. The members show up correctly in my menu now.

    Thanks for chiming in though Until next time, heh.

  • Well, in "obtainElli" it is always supposed to set them to one, and in "obtainSheila" (partly visible in the bottom) it should be 2.

    But if one of the slots is taken, it should move on to the next. Fx slot1 = 1 and you obtain Sheila, then slot2 should get 2. But in my case it still enters 2 into slot1 even though it was already filled.

    I hope that makes sense. My code is probably overly complicated for what it is supposed to do <_<

  • I have a question again.

    I have a private variable on a menu item that I try to assign a value, according to when characters are obtained.

    It should work like this: if slot1 = 0, then it will be assigned the value. But if not 0, slot2 will get the value instead, and so on and so forth... So far I put it up like this:

    <img src="http://img.photobucket.com/albums/v194/Vatina/example.jpg">

    (too lazy to make an example .cap right now)

    But when I run the debugger, I can see that the value in slot1 is still overwritten when I obtain the second character, instead of moving on to slot2 :S I tried a few variations as you can see, without luck.

    Any better suggestions?

  • Well, then that's great Thanks a lot again!

  • Thank you, the changes are very useful. I should be able to learn something from this (I hope!).

    2. Not sure why you're using both the ini and hashtable, so I removed the ini file and kept the hashtable.

    That was attempt at including a pre-made text list of items and then loading them into the hashtable. I guess that wasn't working so well, and that:

    6. Unfortunately, you have to insert keys before you can add to them. So, you could either insert them all at the start of the level, or you could insert them before you add to them. In my example, I just put the insert "sword" with 0, before I added it, this way it creates it then adds to it if it didn't exist (the "insert key" thing is ignored if the key already exists).

    Having an event that creates a bucketfull of hashtable keys when the game starts isn't going to slow down the game too much, is it? From then on I guess the game will just load the information from what is saved. That looks useful.

  • I�d like to 2nd the visual array editor � it would make it so much easier to keep track of what you are doing.

    Maybe something similar for hashtables. I was thinking something alike the �edit private variables� window, where you could get a list of keys and their values.

    What can I say, I like lists�

  • Hi all

    I have a question regarding hashtables. I have been working on trying to create a simple inventory for my game, and for that I have looked through the different topics and caps related to this. Unfortunately they didn't completely solve my problem...

    Instead of showing the items as sprites in my inventory, I want a list with item names and amount held. For this I was planning to use a hashtable. But how do I use the "Load from file" feature when creating the hashtable? I have tried loading an INI file and making the hashtable from that, but it gives me trouble regarding values. (It keeps saying "0" even when I pick up items.)

    Creating keys on the fly when picking up items works, but I'd like to be able to somehow open the hashtable list somewhere so I can manage inventory more easily, or I fear I will loose track of what I am doing.

    How do I make the text show a list of all keys with a value above 0? I tried using the "NewLine" command, but the text still only shows the final name on the list.

    Showing the cap would probably be the easiest, so here is my embarrassing example:

    http://www.mediafire.com/?j1im58d0v310727

    Thanks, I hope I'll be able to understand all these things better one day.

Vati-nyan's avatar

Vati-nyan

Member since 17 Nov, 2010

None one is following Vati-nyan yet!

Connect with Vati-nyan

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Email Verified

Progress

16/44
How to earn trophies