RexMundane's Recent Forum Activity

  • Not solved at all. The proposition seems to suit any needs.

    Do you find any solution yet Rex ?

    Doesn't seem possible in the way I described within Construct 2, unfortunately. Families don't seem to allow for it. The complicated workaround I ended up with was to have one Universal_Prop_Object that serves as all the various things fruits, and changes properties relative to a spreadsheet based on an Item_Name variable assigned at spawn. More complicated than I was hoping, but easily extensible for various item/fruit types, which was the main thing I was looking for.

  • The first two solutions seem to be functionally identical, in as much as I'd end up having to hard-code a different event/sub-event for each different fruit to spawn. Since I don't necessarily know how many different fruit I'll end up with, though, I was hoping for a cleaner solution, like making it all into one big event that covers any possible types. The Identifying variable seems like it'd be a step in the right direction, if I could spawn a specific object based on that variable, without having to create a separate conditional for each object.

  • So I want to do something simple with Families, but don't seem to understand how. Lets say I have a Sprite family called Fruit_Family, and it's full of sprites like Apple, Banana, Orange, etc. So I write an event similar as follows:

    On Click of Fruit_Family: Spawn Fruit_Family at point X,Y

    Now, what I intend is for the specific fruit being clicked to be what's spawned at the given point. However, Spawning from a family seems to just spawn a random member of that family instead. Is there any way to write this event so it will spawn another of the particular family member I've clicked?

  • 1: I want the sprite I've attached the behavior to to only move in the four cardinal directions, no diagonals. I understand that disabling the "Diagonals" option means that the path will only allow those directions, but I want the sprite object to only move in those directions as well, veering along the path just outside it as it changes directions. As I have it moving over a tilemap, this sort of veering naturally means it's never lining up correctly. How do I make it so that the sprite object can only move up down left and right as it makes it's way along the path?

    2: The sprite object finishes moving just next to the points I want it to end on. I assume this is something like when the edge of the sprite touches the edge of the sprite marking it's destination, it stops there. How to I make it so that it doesn't stop moving until the sprite is centered over it's destination point?

  • I've been trying to put together a bit of code so that when the player talks to a character, I'll call a "CharacterSpeech" function for each line of dialogue that appears. As in :

    CharacterSpeech("Here's the first line of dialogue");

    CharacterSpeech("And Here's the Second");

    To facilitate this, as well as having a system I can build off of for other cutscene-style animations (making characters walk around, change animations, etc.) I built a rudimentary event queueing system you can see in the image here, relying on having each event added to the queue waiting for a signal generated by the completion of the previous queued event.

    However, while the queueing seems to work fine, it seems to be doing something odd to the parameter passed to the CharacterSpeech function, namely the text to display. The function parameter (expliticly, the value of "Function.Param(0)" in the code) becomes 0 no matter what is actually passed to it, text, number, whatever, and I have no idea why.

    Now I've fiddled with this a bit, Setting the text isn't the problem, nor the queue position counters or anything. But Strangely, if I disable the first "Wait for Signal" in the function, then while not exactly working, the parameter is passed correctly. It only seems to be while waiting for the first signal that it's affected, and I have no idea why this should be.

    Can anyone help with this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bump.

    Been trying to fiddle with this for a week hoping to find an answer. Keep thinking it will either be some sort of IsScriptedEventHappening boolean flag or otherwise building a sort of event-queue, but no idea where to go from there. Can anyone help?

  • Thanks. I see what you're doing there but it feels like that just creates more logistical problems down the line. Like what if I want a character where he says different things depending on when you're talking to them? If I'm reading this right you couldn't have a second dictionary contained by the character sprite and have the code work. You could theoretically, at the event that would change the character's dialogue, kill the existing character to replace with an exact duplicate who says the second dialogue I suppose, but wouldn't that start getting over-complicated?

    Plus the way I had things set up I was hoping to be able to set up other cutscene-style actions, like having a character move to a certain point, change their animation, etc, using similarly structured functions. I realize I must be coming off as a broken record on this but is there really no way to have, say, a kind of function that checks to see if one of it's kind is running, and if it is then to queue and wait for the current one to finish before running?

  • There might be a mistake, I think that's the same capx file.

  • Thank you but that doesn't seem to do what I'm intending for it to do. If I'm reading it correctly, what will happen is, evidently, the same text will be displayed in the same order each time the "ToggleDialogBox" function is initially called, basically reading the script out of the dictionary. So doesn't that cause a problem if, for example, I have two characters in the same layout who will say different things? Or a character that will say one thing the first time you talk to them, and a different thing on the second?

    I appreciate your time and patience on this, but I seem to still be struggling to understand. In the example as I presented it above, I think the problem solves itself if I could find a way to keep the second call of the CharacterSpeech function from affecting the DialogBox text until the first call is completed, is there not a way to do that?

  • I'm sorry, I still don't understand, I didn't succeed at Computer Science in college and am having a hard time understanding what you mean by this. Can you point me to an example resembles the problem I'm having?

    I don't know how to copy code out of C2, but what I have currently looks like this, where CurrentInteractionMode is a global var that limits player input as I mentioned.

    What do I add to it to make it work like you're saying?

  • My goal is to end up with a basic text/dialog system where the player walks up to a character/object, hits a button, and a few lines of text display. To handle this I created a "CharacterSpeech" function that, on execution:

    1. limits player input (so they can hit button to continue, but aren't running around the screen while the text displays)

    2. turns a GUI Textbox visible

    3. changes the text to the string parameter passed to the function

    4. waits (wait until signal, specifically) until a button is pressed

    5. turns textbox invisible

    6. returns player control

    To test it I had a character call the function upon interaction, to which it promptly said "Hello World!" as expected. However, I want it to say multiple things. I had thought it would have been enough to have two seperate events called upon interaction, both calling the CharacterSpeech function, saying "Hello World" and then "Hello Again," and had assumed that the second function wouldn't be called until the first function completed. This was not the case, and it seems both functions were called simultaneously (which is to say only "Hello Again" appears, having overwritten "Hello World" in the textbox).

    How do I set it up so the second "CharacterSpeech" function called in the interaction event doesn't display until after the preceding function is completed?

  • I've been experiencing this as well, games in the arcade play on my work PC (Win XP, Chrome) but not my home laptop (Win 7, Chrome). Any idea what causes this? I've tried clearing my cache and everything but nothing seems to help

RexMundane's avatar

RexMundane

Member since 7 Feb, 2013

None one is following RexMundane yet!

Connect with RexMundane

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies