TheWyrm's Forum Posts

  • Added gameplay video link.

  • Thanks for the info bud

  • jaredhd

    So what you do is make sure you duplicate all the objects associated with one instance. i.e. Spriter object (SpriterObject), the Sprite object you attach the spriter object to (TextureObject), etc. Then for each of theses objects you set a variable called SpriterNo and set it to the same number for each group of objects. So each instance is made of objects who each have have the same variable with the same number unique to that instance.

    Then you use the following actions to make sure each instance is given it's own command.

    Foreach [SpriterObject]

    Pick [TextureObject] that [TextureObject.SpriterNo] = [SpriterObject.SpriterNo]

    ...Add sub actions here...

    So this loops through each Spriter object and grabs the Sprite object associated with it.

    However, If you want to command a specific instance then you can instead do the following.

    Pick [SpriterObject] that [SpriterObject.SpriterNo] = 1

    Pick [TextureObject] that [TextureObject.SpriterNo] = 1

    ...Add sub actions here...

  • Had to get this off my chest as it was a mind f$$k.

    I made a bad guy with blind spots that patrols the level with collision detection while also using spriter animations. If it spots the player it aims its gun in the players direction and fires bullets at the player. This was pretty straight forward apart from a quirk with spawning bullets from the end of the gun in a spriter animation!

    So I placed two bad guys in the level and suddenly I had to have a way of the game knowing which objects belonged to which AI. For instance I had the following problems.

    -An AI detected an obstacle so it is told to turn around. However all AI would turn around.

    -An AI detects the player and aims at it yet all AI aim the gun at the player but only one AI is spawning the bullets (Not the correct one either).

    -Finding out the gun position within a spriter animation when the spriter plugin has constructed each animation instance.

    Its done now and it's all pretty cool. I think I need a beer!

  • Ah I think I may have cracked it. After more investigation I found just one pair was working. So I had to add a foreach [object type1]

  • Unfortunately it doesn't seem to here.

    [quote:2n26tc50]On [object type1] collides with [obstacle]

    Pick [object type2] if [object type2.NUMBER] = [object type1.NUMBER]

    Set [object type2] invisible

    I want these to be the same object. Are they?

  • Hi guys,

    I'm finding myself stuck. I basically have a load of two types of object. Each of these objects have a variable called NUMBER. Object type1 has a pair object type2, where both have the NUMBER variable set to the same thing.

    Lets say when object type1 collides with an obstacle I want to set the matching pair object type 2 invisible.

    i.e.

    On [object type1] collides with [obstacle]

    Pick [object type2] if [type2.NUMBER] = [type1.NUMBER]

    Set [object type2] invisible

    How would I do this? It's driving me crazy!

  • ludei

    I read it here -> http://support.ludei.com/hc/en-us/articles/202372276-Construct2-HTML5-export-working-on-CocoonJS-2

    So you would say use the HTML exporter for Canvas+ and the CJS export for Webview+?

  • For those that are interested the reply in the community was as followed.

    [quote:3s5xapwv]Hello,

    At this moment, the only thing I can tell you is that we will announce something big really soon . We will keep you all informed.

    Thanks a lot for your comment.

    Cheers .

    IF this does mean we can get third party Cordova plugins it will hopefully mean that we can use cranberrygame plugins in CocoonJS. Which will bring everything together into a pure awesome package. i.e. full iOS and Android support with all the trimmings (Ads, IAP, Social networking, etc). It's hard not to speculate so I'm going to have to keep my excitement to a minimum until an official announcement has been made.

    ludei I have something separate to ask you. Alot of people still use the export to CJS feature in C2. However, I'm pretty sure I read on your website that you prefer people to do a HTML export now. Can you clarify which is the best approach?

  • No problem. It's not the most efficient solution but without a close event I'm not sure how else it could be done.

  • So this is what the manual says:

    [quote:1gc3m6x4]On suspended

    On resumed

    Triggered when the page's visibility changes, or when a mobile app is going in to the background or foreground. When invisible or in the background the app is suspended: all events stop running and all audio is muted.

    So it wouldn't be triggered when closed. There is no on closed action, because browsers don't support it.

    However, what you can do is store the time in webstorage on every second. That way you know the time when the game was closed when opened.

  • ludei

    During the last podcast it was rumored that CJS will at some point support Cordova third party plugins. I'm pretty sure this is a mistaken association of your own plugins -> http://blog.ludei.com/new-cocoonjs-plugins-are-here/. So could you confirm or deny the rumor? If it's true can you give a rough delivery date?

    I have also posted this topic in your community ->

    http://support.ludei.com/hc/communities/public/questions/201137859-CocoonJS-supporting-cordova-plugins-

    Kind regards,

    The Wyrm

  • ok, so basically you calculate the angle between the player and mouse. So when the mouse is directly above the player your angle is 0. You probably want to have it so that to the left of the players its 0 to 180 and to the right of the player it is 0 to -180. You could then use this as a multiplier to rotate the world.

    Rotating the world would be the most complicated aspect as I'm not sure there is an easy way to rotate layout or sprites around an offset (which would be the player position)

    You could maybe stick every other object in a family. Then do some manual fancy rotate at offset stuff.

  • helena Don't worry they said C2 would continue to be supported. The were just speculating about C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds cool. I have loads of experience and can probably help out with lots of things, but I see myself as primarily a designer -> https://www.linkedin.com/in/mathewnicholas. If you're interested then pm me.