joelmayer's Recent Forum Activity

  • Hi Guys

    So, i've been Playing around with Construct today and had this crazy Idea:

    What if you had an Inventory which displays only one Item at a Time. Could also be for switching Weapons with a Scrollwheel for Example. The Textbox came to mind, which i never really used so far but it kinda works so far except that i don't really get the Expressions of it and am not sure how far you can go with it. The basic idea would be:

    You got a hidden Textbox (outside Layout) and an Inventory Slotsprite (or different Weapons on your Character):

    User Picks up Key

    Textbox add Key as a String

    User presses Keyboard Key to switch the active Inventory Item (from Key to Bottle and so on)

    Inventory goes to Animation Key of the Inventory Sprite (The Animation names correspondent with the Textbox String)

    If Animation = Key and Player is overlapping Door plus pressing Enter, delete Key from Textbox

    Well, it works actually and is pretty neat exceeept:

    -I didn't figure out a way to delete a Text from the Textbox. I only found how to remove an ItemID but depending on which object the player picks up first etc. this can vary and is not that useful i think...

    • I don't know if and how you can control the Textbox. I mean the basic up down arrow keys are working but it would be neat if those were ignored and you could cycle through it with your spacebar key or the mousewheel or something.

    What do you think? Anyone ever tried this?

  • Definitely interested in this too

  • Oh my... That's kinda depressing with three Events and yet i have no idea (yet) how to do something like this Better look into the Ajax Plugin then...

  • Oh! Now i got it Thanks a ton!! mindfaQ

    Still interested though in how this would work exactly: set text to family.texttodisplay (instance variable)

    So there's a way to display an Instance Variable of the different Objects when they're in a family? That would sure save a lot of work

  • Thanks mindfaQ

    Unfortunately, it doesn't let me do more than one Else at a time...

    With the other example with families i don't quite get how i can display different Texts for each Item. The Idea is, that the player eventually can pick those up but when they're still on the ground and the player walks over them, it highlights them and shows it's name in a fixed Text Box...

  • Aaaaaaaah!!! *facepalm*

    Makes sense! Ill try that first thing in the morning! Thanks so much

  • Hi Guys...

    Me again... i'm so sorry for asking so many questions on this forum i hope i don't get on anybodys nerves and that in the coming weeks i'll get quieter except when i have a new Game to show...

    But... well it's kinda frustrating, this was supposed to be my first simple Game that nobody will see and yet everytime i'll try to add the simplest of things i get a new strange bug that i can't make out. I did like four video tutorial series and read through the manual as well as two books before even attempting this thing so i hope it's okay that i ask...

    Basically, all i want to do is add a Score to each time the Player kills one of the Mosquitos in my Game and then add some difficulty by subtracting values from Global Variables. Sounds easy enough right? Well, i made a function that subtracts a certain value of each of the Variables. Yet here's the very strange thing that happens as soon as i call it:

    The Game basically plays like this: you switch off the light, the mosquito is coming in, a sprite triggers it that it sits on your nose. Then a Timer starts and within that timeframe you have to turn the lights back on to catch it sitting on your nose. If you wait too long, it will sting and kill you

    It all worked perfectly, but ever since i tried to add the score, this happens:

    The "victory" animation plays, the layer restarts, and then, when you turn off the light again, it immediately turns back on and plays the death frame... As if the timer wouldn't stop in the background or something and as soon as it reckognizes the light being turned on it does what it's supposed to do, play the death animation, since the timer is expired. Yet i stop the timer as you can see in my event sheet and it all works great if i disable the function calling. I just don't know how this could affect anything. The timer calls a global variable as a duration, which would make it possible to make the game a bit harder by giving the player less time to react as soon as the buzzing stops and the mosquito is dangerously close.

    I love how helpful people are in here, yet i don't want to waste anyone's time and come off as trying to get somebody to make that game for me. Yet i'm really kind of stuck and any help is as always greatly appreciated, even if it's just a hint.

    Thanks so much!

    CAPX: https://drive.google.com/file/d/0Bwu0b_8ZTavBR0dSUnhqUm9uaWs/view?usp=sharing

  • Sorry to dig out this old topic, but there must be an easier way to do this. Because the solution korbaach showed me works perfectly with two objects but as soon as i add more, i can't get it to work properly, no matter where i put the else statement.

    All i want is that the Text is ONLY displayed WHILE the character is overlapping the object... As soon as she leaves, the text empties... No idea how to do that though :S

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a ton !

    Now it works like a charm It's funny, i seem to have the right ideas but whenever there's a bug i often times just have the orders wrong... I hope i'll get my head around that someday...

  • Hi All

    I'm still working on my Mosquito Game and have the following Problem:

    When i turn the Light off, i want it to spawn one Mosquito in a certain Timeframe. Now, it seems to work but if i turn on and off the lights quickly a few times and then leave it off, it spawns multiple Objects for some reason that i'm too stupid to yet comprehend...

    It would be fantastic, if somebody could take a look at it: https://drive.google.com/file/d/0Bwu0b_ ... sp=sharing

    Thanks so much!!

  • Okay, i managed to get it running again. I had to make Subevents again but instead of comparing Variables two times it had to be an "Else" block with the second subcondition...

    Can someone explain to me, why it wouldn't work when i just do it manually instead of adding an Else? What's the real difference there? I'm still trying to learn as much as i can, so i'm trying to understand these kind of things... Thanks!!

    ANOTHER PROBLEM though: if i turn the switch on and off quickly and then leave it turned off, it spawns multiple Mosquitos. But i always just want to spawn ONE at a time. There should never be more than one active... Any ideas on how to achieve that? I tried trigger once but that obviously doesn't work since its still spawning as soon as the lights are off... The other thing i tried was to make the Spawn Action into a Group and deactivating it as soon as the Mosquito Variable is set to 1. But that doesn't work either... Any help would be greatly appreciated!!

  • Thanks for your help Roal465 No worries about the english, i understand you perfectly fine

    I tried what you said but it still doesn't react at all to any clicking. I really don't get it, it worked perfectly fine :/ For some reason it seems to not switch my variables anymore... No idea why that is suddenly...

    I updated the CAPX File with your suggested Changes...

joelmayer's avatar

joelmayer

Early Adopter

Member since 22 Aug, 2014

Twitter
joelmayer has 2 followers

Connect with joelmayer

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies