R0J0hound's Recent Forum Activity

  • newt

    You can create stuff without picking it by doing it in a function. This takes it a step further to provide a way to manipulate the object without picking, although it is often preferred to pick the object if you want to do a lot to it.

    Creating a lot of objects at once is better done with normal events than this, but it helps support it if you throw the uids in an array.

    Here is a second version of this with a test where it would possibly be useful.

    https://www.dropbox.com/s/ihkveelb5ljqw ... .capx?dl=1

    * It now works with text values as well as numbers.

    * Array indexes can be negative to access elements from the right instead of left.

    * The error checking was reworked so no if a property can't be accessed it will return "nil". That applies to arrays as well.

    That is better than silently returning 0 like C2 does by default.

    * It has a shortcut way to create arrays and dictionaries.

    I guess the next useful addition would be to add a function to load json data, or something similar.

    Edit:

    Next version is in the works and I’ve found a bunch of issues with this version. Debugging isn’t very trivial at this point, which makes it not super useful for others. It’s a fun pet project, I’ll see how far I can push it.

  • Drago_18

    The first one doesn't but the second one does. It's the same file.

  • When you use "while" you need to make sure it doesn't create an infinite loop. That is the crash you speak of.

    The bullet behavior has a "on step" condition you could probably use to check for collisions at a finer precision.

    You could also use something like a raycast to do it too.

  • I don’t think I follow your idea.

    I’m not going for something complex to use or implement. I only wish it could be made simpler.

  • It’s a pay for plugin last I checked so probably the plugin topic would be the place to ask. If not isn’t there a contact email when you bought it?

    Besides that is there any examples or documentation you can refer to?

    Is q3d one plugin or many? If it’s many then there probably is a master object you need to add. An example will have this.

    You likely don’t want to get into the weeds of the plugin internals if you can help it. But threejs is what the plugin is based on so I would assume it’s included in it somewhere. Again that’s probably done by adding the correct object.

    Anyways those are some ideas that may get you going. The answers aren’t too useful to me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You’d have to upload the file to a site like Dropbox and post a public link to the file here.

  • It certainly isn’t ideal to have to handle each object type and property, but the events to do that are very simple. Plus this is all in evens so changes can be made easily.

    A plugin probably can be made to access stuff too. The minifier is an issue though. Things like variables would be automatic and other properties like xy would need to done manually as well. Also it makes it tedious to make changes to the plugin. I actually have an idea for such a plugin but it’s way on the back burner.

  • I couldn't open the capx because i don't have a third party plugin. Looking at the xml it looks like you set the variables in two different places.

    one place uses choose(0,1,2,3) another just random(0,3),

    the other uses random() in onplace and round(random()) in another.

    My guess is that's the issue, you're setting the value twice.

  • Here is an experiment to allow faster access to objects, arrays and instance variable without having to pick them.

    As a simple example say you have the uid of a sprite you want to get the x value of. You'd have to do:

    sprite: pick by uid 33

    sprite: x=200

    --- do something

    you could do

    system compare function: call("", 33, ".x") = 200

    --- do something

    Or maybe you have something more complex. like an array with uids of sprites, and each sprite has a hat object whose uid is stored in a hat variable. How do you compare the hat color of the sprite in array index 1 with the one in array index 5? and if they are different colors, make both 50 pixel tall?

    The solution probably involves a family or local variables to pick things one by one. It can be fairly complex and the readability of events is reduced.

    Anyways instead of doing that picking the normal way here's how you could do it with the utility function i came up with.

    System: compare function.call("", array.uid, "@", 1, ".hat", ".color") = function.call("", array.uid, "@", 5, ".hat", ".color")

    --- function.call("", array.uid, "@", 1, ".hat", ".height", "=", 50)

    --- function.call("", array.uid, "@", 5, ".hat", ".height", "=", 50)

    Or it even works well for something like arrays of arrays. Say you create it like this:

    global number rootArray=0

    start of layout

    --- set array size to (10,1,1)

    --- set rootArray to array.uid

    --- repeat 10 times

    ------ create array

    ------ function: call("", rootArray, "@", loopindex, "=", array.uid)

    It is a benefit to be able to avoid picking rules. Then you can access the 3rd element of the 2nd array with

    function: call("", rootArray, "@", 2, "@", 3)

    It's basically shorthand picking to get and set variables or values in an array.

    *Currently it doesn't work with text variables.

    *Error checking is minimal.

    * you need to add events to the function for every object type and property you want to support.

    here: the bare initial version.

    https://www.dropbox.com/s/igu4kum3t67nx ... .capx?dl=1

    Could be useful for complex data structures.

  • To me it looks like you'll need:

    * a way to move objects back and forth on a path.

    * use an array or something to have a list of the objects on the path in order. That way you only need to look at the objects next to each other to handle collisions.

    * be able to loop over the list either direction to be able to push chains of objects.

    * pushing objects can be done by either repeatedly moving the next object forward on the path until not overlapping, or a you can go 100% precise and use some math to find the exact point where the two objects intersect.

    * when shooting a new object and it hits an object on the path, it needs to be inserted into the list at that spot. Maybe with a nice gradual transition that moves the object onto the path.

    *it looks like you'll have to keep track of which objects are in contact with each other. Should be as simple as setting a Boolean when they first collide.

    * matches seem to be triggered when adding a new object to the chain or when a new contact is created. Should be simple as checking the area in the list around where the contact happened.

    It's not really scoped to make for a good tutorial.

  • With two tiledbackgrounds you can make it look like it's animated, or at least moving forward.

    https://www.dropbox.com/s/cm27xvzisnoxe ... .capx?dl=1

  • There is value in tweaking the auto-generated corner nodes, so I added an editor, and the ability to load a saved node layout.

    https://www.dropbox.com/s/ypi54gflkh6q9 ... .capx?dl=1

    After doing it i've realized some better ways to do it, but anyways here's how to use it now:

    There is a variable gen_mode in setup that changes if the nodes will be

    0 : auto-generated or

    1: loaded from a saved list

    To use the editor you have to un-comment the action to enable the editor group in event 2.

    When the editor is active you can drag nodes around. Right click to destroy/add new nodes. Finally middle click to put the node list into a editbox that you can copy and paste in events to load later. I made two layouts and the node loading is in events 18-19. Just clone the layout to make other layouts.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound