Shindoh's Recent Forum Activity

  • Hey guys,

    I am just getting back into the realm of equations again, and have a question, that maybe someone more into the depths of this could help me with.

    I am trying to find a formula, into which I input desired Distance (s) and Time (t), resulting in a given Initial Velocity (u) in relation to a negative Acceleration (-a), so that after going the given Distance (s), the Final Velocity (v) = 0.

    What equations I think should help me achieve this somehow:

    s = 1/2 * a * t^2 + (u * t)

    v = u + a*t

    OR in this case:

    s = 1/2 * -a * t^2 + (u * t)

    v = u - a*t

    I know that as an example, if I wanted to go the Distance (s) = 100m in Time (t) = 10s, I would use the following values:

    1.) 0 = 20 - 2*10 [v = u - a*t]

    2.) 100m = -1 * 10^2 + (20 * 10) [s = 1/2 -a * t^2 + (u * t)]

    3.) Now I could just increase the Time (t) as I want in relation to changing either the Initial Velocity (u) or Acceleration(a); For example, if I wanted the Distance(s) = 1000m, I could change Time(t) = 100, and Acceleration(a) = 0.2 .

    But I struggle converting this knowledge and the relativity of the values to each other into a formula. I would grealty appreciate if anyone could help me out here.

    Thanks for Your time.

  • There is an issue with 'or'. I think I found the possible reason for it some time ago, and wanted to work on it now that I started helping with Construct Classic development. But I currently don't have a pc, I can't work on it.

    Here is the link describing the possible issue: http://www.scirra.com/forum/viewtopic.php?f=3&t=7428

    What's weird though, is when following the exact same steps I explain in the (updated) first post, the 'OR' event works, but it will start giving the error message, as soon as You put it into a Group.

  • I tried create two separate events and then combine them with OR, if there is problem, but it works. Maybe you should send your cap to the developers. Have you started your project in CC1.2 or in some older version where OR was still buggy?

    Okay, I tried to nail down the problem a little more now.

    In that project file, the area that always gets me that error when using 'OR', is inside a group.

    Which I thought shouldn't make any difference, but apparently it does?

    1. Test - I made a simple condition example, "If 'Left Mouse Button pressed' OR 'Right Mouse Button pressed' - Move player sprite X+20". THIS WORKS Inside and outside of the group.

    2. Test - Using the same conditions that always gave me the bad 'OR' error. A Bullet Sprite using Bullet Behaviour, called Bullet; "If 'Bullet Exceeds Range' OR 'On Collision with Enemy Family Objects' - Move player sprite X+20". This Works OUTSIDE of any Group. This does NOT WORK, when put inside ANY Group. And always gives the "BAD Event using 'OR' Conditions" error.

    Can anyone explain this to me? If need be I can post the .cap file later.

  • Okay, this is very weird.

    I just tried using 'OR' on a new blank application file (should have done that before), and now it works perfectly.

    But I SWEAR, in my bigger project file, whenever I wanted to use 'OR', it kept telling me it can't be the first condition, although I never put it as the first.

    EDIT: Yeah, I just checked my main project file again, inserting an 'OR' and combining the two events, that I had to seperate before, because the 'OR' wasn't working.

    And indeed, it does NOT work, and I get the error again. "BAD event using 'OR' conditions:..."

    EDIT 2nd: Okay, I tried to nail the problem down a little more now.

    In that project file, the area that always gets me that error when using 'OR', is inside a group.

    Which I thought shouldn't make any difference, but apparently it does?

    1. Test - I made a simple condition example, "If 'Left Mouse Button pressed' OR 'Right Mouse Button pressed' - Move player sprite X+20". THIS WORKS Inside and outside of the group.

    2. Test - Using the same conditions that always gave me the bad 'OR' error. A Bullet Sprite using Bullet Behaviour, called Bullet; "If 'Bullet Exceeds Range' OR 'On Collision with Enemy Family Objects' - Move player sprite X+20". This Works OUTSIDE of any Group. This does NOT WORK, when put inside ANY Group. And always gives the "BAD Event using 'OR' Conditions" error.

    Can anyone explain this to me? If need be I can post the .cap file later.

  • Yes, trust me, exactly like that.

    I know that for sure, because I tried to read up on the 'OR' use in events again on the wiki, after I kept getting the error, after changing everything possible around.

  • EDIT: BUG - This is how You do it: Create a Sprite Object; Give it a Bullet Behaviour; Insert a new Event: " 'On Sprite Bullet Exceeded Range' OR 'On Collision with 'Sprite' " - Sprite: Move at Angle, Speed '20', Direction '0' (Values shouldn't matter).

    THEN: Add a new Group, and move this whole event into that Group, run the application.

    Bad Event Using 'OR':!:

    Is it just here, or does the 'OR' condition never work?

    Whenever I try to use it in the Event Sheet, I get an error on starting the application.

    It is saying something like "OR cannot be used as the first condition".

    Of course OR can't be the first condition, I always have it in the middle between two events.

    And Yes, the 'OR' is inside the same box/frame, as the two events.

    I am using Windows 7 - 64Bit - Construct v1.2

    Thanks for Your time.

  • I see! Thank You for the on point help!

  • Straight to the point: I did some testing on a newly created empty Direct-X application project, after something never seemed to work in another project file and I couldn't figure out why.

    Basically this is what I have:

    Start of Layout Event -> System:Run Script ("array1 = [1,2,3,4,5]")

    Script:

    import random
    if MouseKeyboard.OnKey('A'):
    	Sprite.SetValue('sizeaccel', (random.choice(array1)))[/code:tup5wvjd]
    
    Now, what happens? When I [b]press 'A'[/b] - [b]nothing happens[/b] at all.
    So how do I [i]assign a new value to 'sizeaccel'[/i] with this code? - [b]Clicking the left mouse button[/b].   
    
    Am I confused, or is the program confused? I mean, I only just started learning python, but this seems weird to me.
    
    [b]EDIT:[/b]
    No matter what Key, it always only sets the value on the left mouse button click.
    AND I tried another function, MouseKeyboard.AnyKey() - This one is even better, the '[i]sizeaccel[/i]' variable now spins through all numbers in '[i]array1[/i]' every step, without doing (pressing, clicking) anything at all.
    
    Thanks in advance!
  • I am also using the latest version of Construct Classic (v1.2).

    Using Windows 7 Ultimate 64Bit.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone,

    I am sorry upfront if this sounds like a very basic question, but the search function here always ignored the word "object" in my searches for some reason, lol.

    This also doesn't limit any usability of the program, I just found it strange.

    When You double click the layout area, to insert a new object; the "object type explorer" window opens up, and I can see all object types, but when using the tabs at the bottom, to directly navigate to all object types of a kind, none of the tabs display anything.

    EDIT: Added screenshots

    -Using Construct Classic v1.2

    -Using Windows 7 Ultimate 64bit

    Thank You in advance.

Shindoh's avatar

Shindoh

Member since 24 May, 2011

None one is following Shindoh yet!

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies