Magistross's Recent Forum Activity

  • I modified the raycast example a bit to add bullet firing with ray-like bounces off solids. Plot twist, I'm not using the Bullet behavior for movement but Tween !

    drive.google.com/open

  • You might be interested in the "Raycast reflections" example from the Start page. You could salvage some of the concepts to make your bullets react as rays.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use a function to create your own "Log" implementation.

    Function.Call("Log", 2, 8) thus returns the base 2 log of 8, which is 3.

  • images can't be stored in an Array or Dictionary

    ...unless you store them in data URI format. You can use tools like this to create a base64 encoded image. You can then use the "Load image from URL" to load the result and display the image.

  • Ashley The weird part is that it actually did work, but not for the reason I thought. The variable was changed at 0.1 second interval so the "Set Text" action was setting the correct count.

    Absolutely need another function to create distinct scopes for independent variables.

  • It's not a bug. The loopindex after the wait is back to 0. You might try your luck with a function parameter, I believe I read somewhere that they are kept in a closure or something when used in conjunction with "wait" actions.

    + System: On start of layout
    -> Functions: Call DoCount (Times: 100, LocalLoopindex: 0)
    
    * On function 'DoCount'
    * Parameter 'Times' (Number)
    * Parameter 'LocalLoopindex' (Number)
    ----+ System: Repeat Times times
    -----> System: Set LocalLoopindex to LoopIndex
    -----> System: Wait 0.1 × LocalLoopindex seconds
    -----> Text: Set text to LocalLoopindex
    
  • Indeed, and my mind is actually is little blown by all this !

  • Oh I see, thought this was SDK scripting. Didn't know about actual scripts inside events !

  • Excerpt from the SDK documentation :

    GetInstanceVariableCount()

    Return the number of instance variables for this instance.

    SetInstanceVariableValue(index, value)

    GetInstanceVariableValue(index)

    Set or get an instance variable value by its index. Note the type of the instance variable will be preserved.

    So it seems variable names are lost, and you have to rely on the index.

  • jobel Most programming language implements a "regular expression" interpreter that share more or less the same syntax... so one could say that regular expression is a language agnostic way to search for patterns in some text. It can be used for things like advanced searches\replaces, validation and so on.

    If you're curious about it, this site should have you covered : regular-expressions.info/index.html

  • Weird, it seems some escaping characters were left out when I copy/pasted from RegExr. (That tool is invaluable!)

    To isolate what's between your tags you need to inspect capture group #2 as seen here :

    However, Construct implementation of Regex is a bit lacking in that regard, you can't inspect capture groups while in global mode. You need to rexecute the Regex on each match individually without the "g" flag, which is quite a bother.

  • This Regex would have done the trick also :

    [(\w+)\](.+?)[\/\1\]

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies