Tumba's Recent Forum Activity

  • Oh, ok, will definitely try it out.

    Thanks for clarifying it.

  • Thanks for the answer.

    Sadly, I didnt understand how to use the PinnedUID...

    Tried to, but couldn't figure out how to get the PinnedUID expression to show.

    However, no panic.

    I just assign the HeroUID to every Pinned object.

    That way, when the hero is destroyed I can do "For each [Family] with HeroId = Heroes.UID" to mass-destroy the needed objects.

  • 1. A way to refer to a pinned object.

    Say I have a sprite with a pinned text.

    If the sprite is selected it would be nice to "select pinned" [text]...

    I know there are containers, but in my case I might end up destroying the linked object and that would destroy also the container....

    Pretty please, add "Select pinned [object]" to C2, if it isn't too much of a hassle...

    2. Comments between actions

    Now I only seem able to add comments to events.

    I have several events with lots of actions doing different things.

    I'd love to have some kind of way to group the actions into subgroups just for making them neat and easy to manage.

    A comment row that I could attach between actions would be the easist way to achieve this, I belive.... (groupin actions would be also great...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for your help.

    I'm still a bit shy of using every tick, as I will be wanting to show different thing at different times in the txtCharDeBug.

    I solved it the other way around. When creating the hero and txt fields belonging, I assign a id variable to the hero for each object attached to it.

    Thus, in this case, the hero will have the uid of the txtCharDeBug in its txtCharDeBugId variable.

    This allows me to "pick by id" the fields I want when the hero is triggered, instead of monitoring each field each tick.

    Oh, how I'd low to "pick [txtCharDeBug] pinned to Heroes" when f.ex. looping the Heroes... Would save tons of work, but alas....

    Anyway, could not have solved it without your help.

    Thank you very much!

    Consider this case solved.

  • Ok, that probably works.

    I tried originally to incorporate the action into the on mouse left button released, as it neatly knows which hero to assign the text Objects to. But it updated just once and then all heroes.

    Could the effect be achieved some other way, maybe related to the mouse left button released?

    Every tick, souds a bit overkill, as the purpose is just to see which heroes are selected in the start of the game.

    After that the selection area will disappear and not be used any more...

    Also I'm a bit worried of "pick nearest" as heroes can, theoretically at least, overlap each other...

    <-edit-> I do assign the hero UID to every object related to the hero, so I'll probably manage to cook up something<-edit->

    If you have another idea I'll be happy to hear it, if not, I'm happy already. Thanks!

  • Noob question...

    I have a feeling that the answer to this one is simple, I'm just not able to grasp it at the moment...

    I have a simple layout with sprites of family "Heroes" created on a tiled background covering the center of the window leaving the sides bare.

    What I want:

    When a hero - sprite is dragged and dropped outside of the tiled background the dragged sprites boolean "Selected" should turn to true.

    When a hero - sprite is dragged and dropped inside of the tiled background the dragged sprites boolean "Selected" should turn to false.

    What I have:

    When a hero - sprite is dragged and dropped outside of the tiled background, all Heroes boolean "Selected" turns to true.

    When a hero - sprite is dragged and dropped inside of the tiled background, all Heroes boolean "Selected" turns to false.

    I cannot refer to a specific sprite object as all the sprites are generated randomly from the Sprites in "Heroes" family.

    I assume that this might even be solved by placing the action inside the correct event. I tried with several possibilities, but alas, fail every time...

    Please, what is wrong?

    Link to my CAPX:

    dropbox.com/s/fnecrxap6gxqpqa/CutthroatCaverns.capx

    The fun happens on the Village layout. Ignore the rest...

    This CAPX has a pretty nice Debug system that shows the UID of the sprites and the "Selected" boolean value when it changes.

    So experimenting should be easy...

  • 1. The present Set CSS style action lets me set different CSS values in the System -> On Start of layout one by one.

    Is it somehow possible to use a CSS file and just set the class of, ex text objects to something?

    2 The present Set CSS style action lets me set different CSS values in the System -> On Start of layout. I seem not to be able to use it in, ex Mouse over -events.

    I want to create a CSS file and set objects to different CSS classes like I would normally do in HTML/Javascript. Is it possible?

    Ex, I have a Family: txtMenuTexts

    I want to set them to css Class='Normal' on layout start.

    I want to set them to css Class='Hover' when Mouse Cursor is over them.

    I want to set them to css Class='Normal' when Mouse Cursor is not over them.

    This is basic functionality when doing HTML/Jscript.

    But the only way I can achieve a near (not very) decent management of different styles now, is by using a staggering amount of global variables for the different font faces, sizes and colors + multitude of events, setting those values one by one. Quite unpractical...

    Is there any other way of controlling text styles apart from what passes as CSS in Constructor or global variables?

    Or am I just doing it all very wrongly?

  • Since the subject of this thread has completely changed from the original, I'm ending this thread here and taking my CSS related question to a new topic.

    Thank you everybody for helping me.

    You are the Best!

  • Didn't look at your Capx yet, and beeing a noob to Construct 2 myself I'm not sure if this helps. Hoping so.

    I created a family (Heroes) of several sprites.

    Then I created heroes with something very similar to this:

    system -> Create object Heroes on layer 1 (10,10)   

    =First hero needs a postition

    system -> Create object Heroes on layer 1 (Heroes.X+60,Heroes.Y)

    system -> Create object Heroes on layer 1 (Heroes.X+60,Heroes.Y)

    = The rest of the heroes are created randomly from the Heroes family with a dynamic position referred from the latest instance of Heroes. I only created three, but the principle should work with, for example, a For loop.

    Just set the first instance of family somewhere and loop the rest.

  • Ah sorry.

    Additional condition.

    Found it.

    Thanks.

    Tried to do it as an action...

    Still having problems with finding the Set CSS... cant find it in actions as the Manual claims... Is it too somewhere else?

    <-Edit->

    Found Set CSS...

    But only in System -> Start of layout.

    Didnt find it in for example txtText -> On Created

    or

    Mouse -> Cursor is over txtText

    Which makes it close to useless in my opitnion...

    I would initially want to set a style of Text objects to a CSS style, change them to another when the cursor is over them and back to original when cursor is off.

    There seems to be no way of doing that other by not using css...

    Am I right (hope not...)?

    <-Edit->

  • There are no Pick options in Zorder at all?

    Just "Move to top", "Move to bottom", and "Move to layer".

    Something wrong with my Construct?

    Im also going nuts when trying to find "Set CSS style" for textboxes - I cannot find that action at all

  • I must apologize for my earlier message, that on a second reading might have sounded a bit arrongant. I hope I didnt offend...

    I tested, again, writing the creation code after each Hero creation.

    I must have had some other problem earlier, as I remeber the effect to be totally different. Now, the result was identical, that is, the nametag is positioned wrongly...

    BUT, re-reading closely your answer part 2 , the one I arrogantly tossed aside earlier, I noticed that you suggested creating the text using the heroes imagepoint xy instead of the heroes xy.

    AND THAT DID THE TRICK! \o/

    My understanding of why and how, and how it differs from what I did earlier is far beyond me. But I'm happy, and that is what counts.

    To share my happiness, I'll just share my capx with everybody.

    It doesn't contain any rocket sience, but there is a nice example of drag and drop done with events and the dynamic hero creation(very simple)

    dropbox.com/s/fnecrxap6gxqpqa/CutthroatCaverns.capx

    (Thanks to Whiteclaws)

    (Hope this works. First time Dropbox user. Would make it a h-link but too low rep..)

    If I may, one more quick question...

    When I pile all the heroes on top of each other and drag and drop, it drags and drops all of them. A nice effect, but one I do not want...

    I heard that there is a "just once" event modifier or similar , but can't find it. And if I found it, would it help?

    Alternative solution: prevent heroes from piling...

    What is the easiest way to do it? Creating a colision event or is there a ready made behaviour that would make me even more happy?

Tumba's avatar

Tumba

Member since 28 Jan, 2013

None one is following Tumba yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies