lionz's Forum Posts

  • You do not have permission to view this post

  • I can see the issue why it won't turn, you need an Else. When you set direction to 0 the condition below becomes true and it sets it back to 1. It is a common problem that crops up because the user thinks of it as an if/else but Construct actually runs the first condition then the second one because it became true from the first one, adding the Else direction=0 instead means it becomes a true if/else statement when triggered.

  • What you've described should work in theory so it must be a problem with event structure and picking. When an 'enemy' collides with 'family' then in actions you can apply to each individually with enemy actions and family actions to alter variables or make them swap directions and such. Try to keep as simple as possible at first and see if it works because other events can also interfere.

  • For the dialogue can do with instance variable on the npc, so default is 0 - player presses chat button then if var= 0 show text '1', when you next press the button increase the variable by 1, if var=1 then show text '2' etc under that particular npc.

    To stop the player from moving, when you start to chat you can set a global variable to 1 that was 0 before by default. Then under your player movement events add a condition if that var=0, so when it is 1 you cannot move. After chat has finished, set that global variable back to 0.

  • I kept my response above simple and related to picking only so as to not confuse. But yeah the usual for a platformer I think would be an overlap check, player is overlapping block, and if they can overlap multiple you can use this with 'pick nearest block to player', rather than a for each with system condition comparing distance which won't work well.

  • You need to pick the block that was picked up. At the moment the throw logic on 2nd event applies to all blocks so a condition is needed on the left to pick that one block. I would use an instance variable on the block so set a value on the one you are throwing in the 1st event, so you can pick it in the second event. You could use 'is pinned' but I prefer a variable like 'isHeld=yes'

  • Ah ok, sorry then I think that's not possible for css. I would try the text object instead if you want to colour part of the text.

  • Set text to : replace(Self.Text,"hi","[color=Orange]Hello![/color]")

  • You can use set text to replace() and inside, the replacement text can include the BBcode [color=red]text[/color] for example.

  • 1. 'is dragging' set object size scale higher, when not 'is dragging' (inverted) set object size scale to normal or 1.0

    2. use invisible sprites as the slots and set position to nearest when dropped, or have one character sprite and its image points and set position to image point

    3. you can store the initial positions of the objects as instance variable on the object, if you 'drop' an object and it is overlapping another (space is occupied) then you can set its position back to the initial x,y from instance variables

  • C2 is kind of ancient now and there are plugins that block from opening this capx. What problem are you having with inventories ?

  • Not sure if helpful but I have a medium sized game now and hardly use function in function, I prefer to call the function then wait for a signal from that function and run the next one, in this way you have all of the function calls in an action block and can easily see the flow. If I must use function within function then inside that function will be waiting for a signal from the embedded one.

  • Sometimes the order of picking matters so on event 4 the 'not full' condition needs to be first rather than just pick the lowest slot first, so swap those two conditions. The other issue is with the create action, you need to bring that down to even 4 so it creates it on the picked inventory slot.

  • main problem is you are clicking on a fruit then creating the same object. I would use a separate inventory icon object to create so you can see what's going on. Most problems should go away after this because you will now pick the fruit you clicked on to grab the animation name and create the inventory icon instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice! Yes I get what you mean, it is easy to think that it would just pick one condition but it actually runs lower down conditions if they become true before it gets there (in the same tick) so Else is important if you want an if/else type logic.