jangsy5's Forum Posts

  • I tried downloading the plugin sdk from the appropriate thread but for some reason the link doesn't respond. So does someone have the v0.99 sdk plugin that I can copy off? (dropbox or something like that)

  • I know this may not be new to many people. I need an object bounce off another object. Well let me explain a few things first.

    I'm making a space fairing game. I have an idea of adding gravitational aspect to the game. So, I installed the custom plugin for gravitation behavior (I found it in the forums). It's exactly what I need but the problem arose when I wanted the ship to bounce off asteroids and other ships I couldn't seem to get it right.

    First I tried adding ball behavior and it seem to completely ruin the controls. So I tried the physics behavior, that too failed.

    So I'm here to ask you guys if you know how to write an event script in CC to make the ship bounce off an asteroid or a wall? (maybe you could tell me the maths behind it too so I can try working out how to bounce two ships that collides).

  • Hello there. I just want some feedback for my upcoming game DSTOhttp://www.moddb.com/games/dsto.

    Have a look and if it seems interesting please give some feed back so I can improve it.

    I need to know few things. The speed at which sprites move is appropriate. The art/style approach. If there's anything else you'd like to discuss please do so here.

    Also on a side note this game is derrived from my old project called Dot Dodger. You'd might want to look at this too if you're interested in commenting some suggestions too.

  • Yeah I can't dl it too.

    I have a suggestion though.

    Instead of using a hit box why don't u just work out the distance the animation does it's attack? Bare with me for a moment. It's a 2D platformer right? Sidescroller? If that's so and I assume it's left or right direction of attack the logic should be:

    • Attack Button Pushed & player is facing 'left' (or right)

    + Play the Animation Sequence Attack

    + Maybe sound too

    -- If target (or could use 'any object') is within the distance of attack (depends on left or right)

    ++ Take Damage?

  • So in other words doing:

    <color=red>Enter</color>

    <color=green>Exit</color>

    will not work. I in fact have to create multiple text objects to create the effect that I want. Well this makes it a bit difficult.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hm... I don't think you need to use array at all. There are special system functions that seem to do the job you'd want.

    Some functions you should know:

    -Left(string,N)

    -Right(string,N)

    I'll explain these later.

    So what I've read you want something like "here's the text, now copy it".

    Ok. First the variables:

    Paragraph = "Bla Bla Bla Bla"

    TheLetter = ""

    Now this is the logic. I don't know how you'll fit it into your game but you'll manage. Using Left() you can find the very first letter of any string chosen:

    TheLetter = Left(Paragraph,1)

    This function Left() will cut down the string Paragraph to the number (ie, in this case the very first letter of Paragraph). Once we cut down Paragraph it will be something like "B" and will be the variable TheLetter.

    Ok so you'll need to detect the key pressed which will equal TheLetter. This is a trick I do not know, at least for now.

    Once the key pressed equals TheLetter the game should remove that letter by using Right() which works the other way than Left().

    Paragraph = Right(Paragraph,Len(Paragraph)-1)

    This will remove the first letter of Paragraph and will leave it with "la Bla Bla Bla".

    Then you can make it cycle again.

  • I was wondering can the text object change colours of particular line of text?

    This is what I mean.

    string is:

    "Enter" + NewLine + "Exit"

    Then it should be:

    <font color=blue>Enter

    Exit</font>

    If I were to use text object I could change the colour of all text to red. However, I do not know how to change the colour of 1 line or a section of the string to red (or any other colour)

    If I could change the colour of particular text it would look something like:

    <font color=red>Enter</font>

    <font color=green>Exit</font>

    Is there actually some kind of tags (like in html/css) that I could add into the string to modify the colours? Or is the text of the text object is just a long line of string?

  • I just realised another reason. In python and many other programming languages you don't have to predefine variables like you would in CC. In python I can just have variable 'i' within a method without defining the variable 'i' before hand. In construct though you can't do that, now can you?

  • Oh. Then it's learning purpose :P

  • Right now I'm both using python to create various functions for my game and learning at the same time.

    But then I did use GML for almost everything in GM8. So in the end I might use more python scripts than I'll click and drag for almost everything.

  • Yet again I thank you. You're about the best help I got here. If only there was a 'like' button... lol

    And, ah, I see how you get x and y. It's from something in the lines of (x-a)^2+(y-b)^2=r^2 isn't it? Didn't know that 't' in cos or sin * 't' was the angle between the two points relative to the x axis. Thanks again. ^^

  • Maybe put it in Construct's engine page in IndieDB? Has everyone forgotten it? I know it's not the place to upload quick examples but maybe as a database for plugins?

  • GIMP and Paint.Net

    Both do almost similar things but the layouts are slightly different. I prefer GIMP though.

    I still don't get how people can use a mouse to draw awesome drawings. I'm perfectly fine with a mouse to click or drag but never to draw. *sigh.

  • Thanks heaps R0J0hound. Just knowing how to retrieve names and attributes helped a lot. If only there was some more in depth tutorial of the integration of python and CC or at least a descriptive reference table. I might make one once I master the basics.

    I'll digress. I have been wondering how I could make a sprite object appear near this object called 'player'. I wanted to make a proper range limit to it, as in randomly spawn in a circular area around 'player'.

    So here's what I've come up with. Using some basic Pythagoras Theorem to randomly spawn objects in a circular area relative to 'player'.

    from random import random,randomint,choice
    from math import sqrt,pow
    
    def SpawnNearPlayer(o,l,rangeMin,rangeMax):
         objectN = o.__class__.__name__
         playerN = player.__class__.__name__
         
         rads = randomint(rangeMin,rangeMax)     #distance from 'player' object
         xside = randomint(1,rads)*randomint(-1,1)     #randomising x-axis
         yside = sqrt(pow(rads,2) - pow(xside,2))*choice(-1,1)     #randomising y-axis to fit x-axis and distance
         
         #create the object relative to 'player'
         System.Create(objectN,l,
              int(xside)+getattr(SOL,playerN).x,
              int(yside)+getattr(SOL,playerN).y)

    I know there must be a more clean or better way of doing this but with only couple of weeks total experience in programming I'm still a newb.

    Also there is another problem. The function I just wrote will definitely create objects out side the screen too (outside the game boundaries). This may cause some issues and I was wondering is there a way to cut out the area that is outside the screen?

    I mean to say is there some kind of method that takes into consideration the boundaries of the game so my function won't choose a vector there?

    I must learn more but the official python manual is a pain to read through. All I need to know is things that are slightly advanced than beginner's (since I attempted to learn C#).

  • The only thing I can come up with is something like an object canvas that has alpha effect and draws on 'white'(that will be transparent in alpha) on a black background which will reveal the sprites behind the canvas. Never tried and possibly never be able to do it myself.

    Sorry but just an idea.