littanana's Recent Forum Activity

  • Toon doesn't create outlines of objects.

    Here's a non-webgl way to do outlines with the paster object.

    https://dl.dropboxusercontent.com/u/542 ... tline.capx

    I wrote a rly long post but I somehow managed to lose it since I had to sign in again when I was trying to post it?? Either way, this is exactly what I am after and I am so glad to see this!

    Thank you so much! :>

  • Oh um, there is a webGL effect called Toon that should create outlines, but I'm not quite sure why its not making them on my objects... I will try and figure this out lol

  • For me it works, but I have not tried it with every exporter.

    (edit: seems to be compatible with nw.js)

    It gives this error: "Unable to load plugin in 'C:\Program Files\Construct 2\exporters\html5\plugins\outline\': Cannot open file 'C:\Program Files\Construct 2\exporters\html5\plugins\outline\common.js'

    This plugin will not be available in the editor.

    Am I putting it in the wrong folder or something? I haven't tried to install plugins before.

    Why not just create your graphics with outlines?

    Another option would be to use the paster object to only create outlines for the stuff on screen. Basically paste all the objects you want to have an outline to it. Make it all black by pasting a all black object to it with a blend mode. Then finally pasting it to a second object in all 8 directions.

    The shader would likely be the fastest. I don't use webgl anymore so I haven't touched the effect in a while.

    Well I don't want the outline to overlap with the actual graphics so they all should run in the background so I can't create them with outlines.

    I will look into that other option you talked about. I'm not to experienced with any of that but I will see what I can do by myself.

  • I think the outline effect does the same (moving into 8 directions to create the outline). So it might still be slow, but at least it is easier on your code.

    Ah right I forgot to mention. I found that with google. And anyway the last pages were just comments on it not being working (like some said it works in preview but not in export) so I assume the creator abandoned the code? I downloaded it and it just gave me an error when I tried to start C2 so it doesn't work.

  • I did this... I manually create new sprites for the player and position them around the player with few pixels offset to all the eight directions. Set the mirror and frame to same than the host. Yeah.

    Problems:

    1) It works but I'm extremely worried if any game can run this if I'm creating outlines for my player, maybe max 15 enemies at once and also items that drop from dead enemies and some possible item pickups... So think anything from 1 to 20 sprites at once having 8 copies. Is that much?

    2) Also I want to know if there is any easier way to achieve this and, how to I create this all for all my other sprites easily.

    Thanks for reading!

  • you could also look at using lerp.

    so if you had an instance variable called ivHealth

    healthbar set width to lerp(self.width,self.ivHealth,0.01)

    Hey, I'm currently using event:

    healthbar set width to "(HP/maxHP)*barMaxHP.Width"

    With my healthbar being a sprite that places itself on another sprite which is the maxHP.

    How do I combine this code with the Lerp thingy? I can't figure it out since I don't really understand perfectly what lerp does.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

  • I have an ai following me and another ai following the first ai. I want them to sort themself properly so it doesn't look like the one in the front is under the one at the back.

    I tried to do this but I just can't get it to work even though the event should be right following the advice that was given in this thread?

    link:

    https://www.scirra.com/forum/z-order-equals-to-y-position_t85622[/code:1df5mcm1]
    
    my code:
    [img="http://i.imgur.com/r8mHcTv.png"]
  • .. actually i just got it to work and came back to post the .capx lol

    https://drive.google.com/file/d/0Bw7sth_-pQTXZWtIbTN0dWtRRVU/view?usp=sharing[/code:3es20waq]
    
    Thanks either way! I'm gonna check that out and see which code is better!
  • I'm going to have the game consist of multiple layouts that together make up the game map.

    I know how to move from layer to layer, whoever how can i create something like this;

    • when i'm in layout 1 and i move to layout 2 i want to be on the left side of layout 2 (because that is the direction i came from)
    • now if i move to layout 3 i want to be on the left side of layout 3 again.
    • now if i move back to layout 2 i want to be on the right side of the map.

    I tried to recreate it with a global variable that remembers which side i existed in last time but i think the code that changes the layout runs and doesn't do any other code..? I also use the same event sheet for every layour if that makes any difference.

    So any help?

  • Thank you so much!

  • blackhornettechnologies.com/Construct2Stuff/helpmepickuponlyone_BHT.capx

    Keep track of the current item's UID, so you can exclude it, as needed.

    Can you explain the code? I'm glad to see it work, but I want to be able to learn it so maybe next time I can do something similar myself.

    How does this code work if I had two different object types at the same time when I'm trying to pick up something?

    Also, how can I add onto this an make a system to have a "carrying something" state for the player. I'm hoping to add custom animations and custom movements (mainly just slower, and weaker jump)

littanana's avatar

littanana

Member since 27 Nov, 2015

None one is following littanana yet!

Connect with littanana

Trophy Case

  • 8-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

10/44
How to earn trophies