Physic Objects + Drag&Drop control

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • ok, i tried this one:

    + NOT spr_castleelement01 (Pick) AND spr_forbiddenArea (pick) are overlapping

    + create Object spr_catapultball (just to see, if it works)

    but it starts spawning catapultballs from the beginning. why?

    http://www.oinobareion.at/files/undersiege.0.01.cap

    looks quite funny, but it's not what I expected

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just looked at your .cap, and messed around with it for a while. No matter what I tried, it still spawned the cannon balls. I was scratching my head saying "what the hell is going on?"

    Then Mr. Obvious drove a truck through my living room and ran me over while honking and yelling "DUH, PIXELS"

    Your forbidden area sprite is set to Per Pixel collision. But... it has no pixels. Set it to bounding box and it works fine . I just assumed you had it set that way so I totally overlooked it.

    Sometimes the most obvious answer is the least obvious answer I guess...

  • I'm running construct v.0.99.72 and all the files run kinda funky..

    everything just drops down and then it crashes..

    just me ?

    [edit]

    hmm.. after looking into it again.. i have to click in the editor on every item that has a physics behaviour then it starts to work . . . better but not right i think...

    There are millions of balls droping down and sii.. how do i make a video of this?

  • I'm running construct v.0.99.72 and all the files run kinda funky..

    I can confirm that's true. It's likely due to the new changes to the Physics behavior in 99.72. Since this .cap was made in an earlier version, the changes to Construct broke it. It happens occasionally, when changes get made something might break. That's the nature of beta software... nothing is permanent yet.

    Anyway it is fixable, as you said... you can click on each object and apparently that propagates the info in the new "Simulation Steps" field in the properties that was added in the recent build. And any new physics project made with 99.72 will work fine.

    By the way, the millions of balls dropping down thing is what is supposed to happen... it's coded with events to do that

  • > I'm running construct v.0.99.72 and all the files run kinda funky..

    >

    I can confirm that's true. It's likely due to the new changes to the Physics behavior in 99.72. Since this .cap was made in an earlier version, the changes to Construct broke it. It happens occasionally, when changes get made something might break. That's the nature of beta software... nothing is permanent yet.

    Anyway it is fixable, as you said... you can click on each object and apparently that propagates the info in the new "Simulation Steps" field in the properties that was added in the recent build. And any new physics project made with 99.72 will work fine.

    By the way, the millions of balls dropping down thing is what is supposed to happen... it's coded with events to do that

    ahh.. figures.. thought it was something like that..

    didnt look at the code that well.. was in a real hurry.. running late to see Avatar in 3d.. awesome..

    btw.. did you get the pm ?

  • Yeah I did, sorry I've been a bit busy. I'll take a look at it later and let you know what's up.

  • Yeah I did, sorry I've been a bit busy. I'll take a look at it later and let you know what's up.

    np

  • Thanks for your help - again ;D. However, I encountered another two problems where I'm afraid I also might need your valuable assistance :

    First, I'd like to implement some kind of ball counter showing the remaining amount of balls left represented by little ball icons. So I figure you'd have to spawn as many ball sprite instances as a ballcounter variable counts - any ideas on what might be the easiest way to achieve that ? (especially the spawning part)

    Second, I'd like to define a "game over" state that ends the game. The problem is that having used the (indeed quite valuable) 'forbidden area sprite'-workaround I still don't have any means to make sure that the scene has "settled". This very problem becomes apparent when all my balls are fired away (and eventually destroyed) and the castle is in the process of falling apart but still within the bounding of the forbidden area sprite. Any ideas on that ?

    Thanks in advance !!

    http://www.oinobareion.at/~hullux/undersiege.0.01.cap

  • First, I'd like to implement some kind of ball counter showing the remaining amount of balls left represented by little ball icons. So I figure you'd have to spawn as many ball sprite instances as a ballcounter variable counts - any ideas on what might be the easiest way to achieve that ? (especially the spawning part)

    Here's one easy way of doing that:

    http://dl.dropbox.com/u/529356/ballcounter.cap

    It uses Tiled Background. I resized your ball sprite to fit in a 32x32 space.

    As for the game over thing... do you mean you want to know when all of the wall pieces have stopped moving?

  • Thanks deadeye, you're fantastic ;D. Small problem, though, the ballcounter.cap doesn't open correctly (on both my machines) (runtime error/abnormal program termination), could the file be corrupt or something ?

    As for the game over issue - yes, that's exactly what I meant

  • That .cap is using v0.99.72, you should be able to open it with that. Sorry for the confusion.

    Anyway, you could try a For Each loop on your wall objects, and add up all their X and Y velocities (make sure to change them to a positive number first, like abs(wall[physics].VelocityX), etc.). Then when the loop is done, if the total of all their velocities is, say, less than 1 or 2 then you know they're pretty much settled. Of course you should only start checking for this after you confirm a hit.

    As for setting states for your game, you could try putting your events into groups. All of your control events in one group, all of your collision events in another, etc. Then when you "win" you disable the control and collision groups and activate the "win" group which has all of your winning events in it. Same for "game over." You can disable groups by default in the event sheet editor and activate/deactivate them at runtime using System actions.

  • Thanks again . I tried a ForEach loop that gets invoked every 10 milliseconds (just for testing purposes) and checks if the sum of the absolute .velocityX and .velocityY of each single wall instance is zero (thus indicating the wall elements to be "settled"). However, it seems to pick only one instance, although the documentation of system conditions/loops states that a Compare Values-event , if placed below/in a ForEach loop, picks every single object instance. Am I overlooking something important here ?

    http://www.oinobareion.at/~hullux/undersiege.0.01.cap

  • Another problem I encountered is that when I try to spawn a family (of sprites) on an image point of another sprite, it merely spawns randomly selected (at least it seems to me that way) family members. Please help ...

  • make sure that the sprite that is spawning is not in the family of the spawned objects

  • ok, I checked that, but the sprite spawning the family members is not in that family. any other ideas what might cause the problem ?

    cheers, barneygumble44

    http://www.oinobareion.at/~hullux/undersiege.0.01.cap

    edit: I forgot, the game is supposed to go like this: You've got 3 catapult balls each round and if you don't manage to destroy the castle using them, you start catapulting your very catapult crew . The crewman character consists of five individual sprites hinged together and organized into a family, the problem occurs when I want to spawn the family and only individual members (bodyparts, that is) get spawned.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)