Tobye's Forum Posts

  • Hey all,

    I am trying to make it so that when an object is moving towards a location, it will play the corresponding animation. For example, if their angle of movement is between 315 and 45, it plays the 'Right' animation.

    To calculate the angle, I have a family instance variable called AngleTracker which is set to 'angle(minions.x, minions.y, sprite9.x, sprite9.y)' as long as an enemy has instance variable 'Selected' to 1.

    I can get it to all work fine for right, down and left, but for some reason up (>225, <315) just won't work. They will still move in the correct way, but won't change their animation, instead always reverting to the 'Right' animation (>315 OR <45).

    I am guessing the issue has something to do with the fact that 'Right' uses an OR block, but I don't know how to get around that.

    Here's a link to the capx if someone could have a look for me, but be aware it uses 'moveto' and 'pushoutsolid' behaviours:

    dropbox.com/s/sb77z480hrvq4xl/Example.capx

    I also tried to do it by pinning a pointer to each instance and point them towards the target and having each instance play the animation in accordance with their pointer's angle, but instead they would all reference only a single pointer's angle. If you have any ideas on that method it would also help!

    And just quickly, if anyone knows which path finding plugin would work best for this type of game it would be nice, I have only had a quick look at them so far.

  • Have you tried just adding to timescale? If there are other things you want to move at a constant speed you could just set them to normal with each increase.

  • I tried it exactly as Keepee said and it worked perfect.

  • Woo-hoo! Finally published one on Android ^^ Looking forward to updating it with direct canvas when possible ;)

  • Hey all,

    Just wondering if anyone has published a game through appmobi yet, and if so, do you have an example I could look through? I have 5 games built so far, but they always run into a full game-breaking glitch at some point, most recently one of my games just makes all new images appear as black boxes (all the games work fine in Construct, only break when in appmobi/device).

    So yeah, I would really like to compare what I have done with something that has actually been released, or even just to know if it is possible at all.

  • Hey again Tap, I was mucking around with a test project and have another bug. This one only happens when testing on a Sony Xperia so far (does not occur on Galaxy Tab or Galaxy S3).

    For some reason, the image with the lowest Z position on the lowest layer turns black when you test it on the device (XDK is fine). Once it occurs, copying, cloning or moving the object has no effect - like the image is infected. However, you can simply create a new version of exactly the same image and it works fine, so it has no breaking problems so far. But if someone else is going to release their game, they should be aware of this so they can make the fix.

    Link to broken version: dropbox.com/s/5b6y7ib20zegmqk/AngryFox.capx

    Link to version with same sprite re-added:

    dropbox.com/s/unbq7t4rjb7vu6p/AngryFoxFix.capx

    Both do not use direct canvas, as the game won't even start if using DC.

    EDIT: Also I should add that starting this project in Construct and on the device starts the game normally, whereas on the XDK the screen starts in a different location. I reckon it's just because of the scroll-to functions conflicting, but again it doesn't really matter.

  • Hey Tap,

    While I thought the crash issue was just with direct canvas, I have just been getting the exact same thing with a little RPG I was making that doesn't use direct canvas (because I wanted the text function from construct, and performance is fine without it).

    Just letting you know in case you weren't already aware.

  • Hey guys,

    I just got around to testing with no luck. If I do create on start of layout I get the black screen, if I try wait 5 seconds it waits 5 seconds then simply freezes (in the game screen, no black screen). Guess I just gotta suck it up and wait!

  • Hm, well still doing better than me. I got to test for just a few minutes last night and the appmobi app kept crashing -_- (Where it quits the app, not the black screen.) I tried CocoonJS a little while back, but all I got was a blank screen with the FPS counter up the top.

    However, when my games were working on Android they ran very smooth and there was a VERY noticeable difference between using direct canvas and not.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great news! I have a question though: is this only if there is a large number of sprites when the game loads? One of my games spawned quite a few objects during the game and that worked fine to begin with. If so, can we workaround by simply spawning initial items on "start of layout" for example?

    I am unable to test for the next 3-4 days, so maybe you could try it ?

  • Sent you a PM with links to very simple examples consisting of just 5-10 sprites and nothing else. One works, the other doesn't. Hope that helps!

  • Yeah alrighty, tomorrow I will make up two: one that works and one that doesn't and pm them to you.

  • tap: just wondering if you are heading towards a fix for this problem in the next week or so? I just want to know because if it's still a while off I'll try to get it working under the current restraints.

  • Phew, thanks Tap. I was sweating pretty hard over that.

    ArcadEd: How exactly does it crash for you out of curiosity? Sometimes I just get a white screen, then I go and alter some things and then it will give me a black screen instead and go to the 'launch' screen after a few seconds. I'm not sure if these are two separate issues is all.

    And on Android it either works or it doesn't for me, I haven't been able to get to a title screen or anything, but the issues you describe there sounds just like my iPhone tests.

  • Hey Tap,

    Sorry but it looks like I have another problem. I installed the new update (105), and now it comes up with this error when I try to open my project:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Action ID does not appear to exist in related plugin

    Condition: plugin->HasActionID(act_id)

    File: Projects\EventAction.cpp

    Line: 36

    Function: __cdecl EventAction::EventAction(class EventBlock &,class ObjectClass *,class BehaviorType *,int,class std::vector<class std::unique_ptr<class EventParameter,struct std::default_delete<class EventParameter> >,class std::allocator<class std::unique_ptr<class EventParameter,struct std::default_delete<class EventParameter> > > > &&)

    Build: release 105 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

    As it has to do with plugins apparently, and that there was some issue with regarding this appmobi plugin and official releases, I assumed it had to do with this and wanted to check before reporting it as a bug. So I tried reinstalling this as I (successfully) did last time, but now it comes up with a message saying the appmobi plugin is not present so still can't open the project. I even tried going back to version 104, but the problem persists.

    Am I right about this bug having to do with your plugin? And if so, how can I fix it?