00Rez's Forum Posts

  • > Duration behavior

    > (Update: 2012/06/16)

    >

    > The idea of this behavior was came from

    > "Duration behavior" is a timer-like behavior. It will execute callbacks during duration. Like timer behavior, duration need to connect to timeline plugin and function plugin.

    >

    > See sample capx for more detail.

    >

    > <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-28.png" border="0">

    > Left side is the setting of duration:

    > Duration time = 1 second : start at 0, end at 1

    > Interval time = 0.3 second : intervals for each 0.3

    >

    > Right side is the execution result:

    > 0 -> execute callback "start"

    > 0.3 -> execute callback "interval"

    > 0.6 -> execute callback "interval"

    > 0.9 -> execute callback "interval"

    > 1 -> execute callback "end"

    >

    > Set callback to "" (empty string) could skip this callback.

    This is very good. There's one or two things missing so I'll upload my example and PM you a link to my behavior with a simple example to show you exactly what I mean. Thanks a lot for your time on this Rex!

    Here is the example to show you my behavior. Left click to move, left click and hold on enemy to attack. Wait till night to get stronger.

  • Duration behavior

    (Update: 2012/06/16)

    The idea of this behavior was came from

    "Duration behavior" is a timer-like behavior. It will execute callbacks during duration. Like timer behavior, duration need to connect to timeline plugin and function plugin.

    See sample capx for more detail.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-28.png" border="0">

    Left side is the setting of duration:

    Duration time = 1 second : start at 0, end at 1

    Interval time = 0.3 second : intervals for each 0.3

    Right side is the execution result:

    0 -> execute callback "start"

    0.3 -> execute callback "interval"

    0.6 -> execute callback "interval"

    0.9 -> execute callback "interval"

    1 -> execute callback "end"

    Set callback to "" (empty string) could skip this callback.

    This is very good. There's one or two things missing so I'll upload my example and PM you a link to my behavior with a simple example to show you exactly what I mean. Thanks a lot for your time on this Rex!

  • 00Rez

    Does worksheet plugin match (or similar) this requirement?

    Yeah thanks rex. Thought I'd seen something related. Can the worksheet call during the timer rather than when it finishes? Would it be worth making a behavior of mine? I've got it down just need to refine it. What do you think?

  • So its basically a special trigger with a timer?

    Sounds interesting, and sounds like it could reduce a number of events.

    Yeah exactly. Reducing events is very important and making it easy to use is most important. Getting constant precise timing is difficult but it hardly effects anything and it's only marginal from what I can see. I'm not an amazing programmer so rexrainbow and fellow members could probably think of better methods for programming the core better. I had the idea through playing Diablo 3. It covers everything from time of day e.g. morning, midday, afternoon, night, etc. Conversations, attacks, items, etc. It could be great thing if done right. Even better if it was built into Construct 2 possibly as part of the function plugin.

  • 00Rez

    Could you release more information?

    Yeah. I wanted a simple event system that could handle instant events such as taking damage and extended events such as healing over a period of time. It's a behavior. Each event is created like the above screenshot and is made up of three sub events: start, middle and end. Each event can be concurrent, stacked or unique. An event is triggered during or at the end of the middle event. Forever just means it doesn't stop. For now a text is returned when the event is triggered every tick. This can be used with a comparison. It allows very complex systems such as weather etc.

  • Would anyone be interested in my own interpretation of a simple event system. I know there will be vastly superior ways of doing this and already plugins out there but I'd thought I'd share to see what fellow members think...

    <img src="https://dl.dropbox.com/u/19078872/Event.png" border="0" />

  • vtrix < make sure it tells you I've replied (see last post).

  • Thanks for this. It's good you're testing I don't really have alot of free time so thanks. I will have a look into this soon. Can you try setting the blockers using position rather than objects and see if it works?

  • > great plugin, im experimenting with this pathfinder, with multiple agents, it already works but it keeps jamming and gives an error in chromeconsole

    >

    > its a bit hit and miss sometimes it crashes in first seconds, mostly under 30 seconds ( i have speed up the runs, but slow crashes too)

    >

    > someone any thought on the error, not sure if its the plugin or something else

    >

    > astartest

    I found the bug which it seems I've already fixed in my local version so I'll upload soon as a new version...

    Updated Astar/Pathfinder to 0.23, see first post.

  • great plugin, im experimenting with this pathfinder, with multiple agents, it already works but it keeps jamming and gives an error in chromeconsole

    its a bit hit and miss sometimes it crashes in first seconds, mostly under 30 seconds ( i have speed up the runs, but slow crashes too)

    someone any thought on the error, not sure if its the plugin or something else

    astartest

    I found the bug which it seems I've already fixed in my local version so I'll upload soon as a new version...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a method to call plugin's action from behavior, so that behavior could extend plugin by calling plugin's action.

    cr.plugins_.Text.prototype.acts.SetText.apply(this.inst, [param]);

    This could call other behavior's action. It's also useful, too.

    cr.behaviors.Physics.prototype.acts.ApplyForceToward.apply(this.physics_behavior_inst, [f, px, py, 0]);

    Nice! Thanks Rex. Unless you've already updated the function plugin could you have it so if you try and run a string that isn't set as a function it doesn't throw an error saying the function doesn't exist? Would ignoring be better than throwing an error? Anyway thanks for the contribution. I'm using it for an event system.

  • great plugin, im experimenting with this pathfinder, with multiple agents, it already works but it keeps jamming and gives an error in chromeconsole

    its a bit hit and miss sometimes it crashes in first seconds, mostly under 30 seconds ( i have speed up the runs, but slow crashes too)

    someone any thought on the error, not sure if its the plugin or something else

    astartest

    Great test! I've found a bug "board[cx2]" is undefined. I'll have a look into this. If you run it in firefox with firebug installed it catches the error.

  • Awesome Plugins! <img src="smileys/smiley1.gif" border="0" align="middle" /> many thanks for sharing them with us.

    for the pathfinder, you got any idea how to get an event for arrive at the final destination, without using collision check or something like that?

    Hi Xeed,

    In the demo a "Position" variable is used to keep track of the position on the path. You can use the expression "PathLength" and then compare the current position to see whether they equal. You can then trigger an event using this comparison.

    Hope this helps.

  • Hi guys

    I have been thinking about this to a project of mine, but have some things I worry about and hope you can help me determine if this is something I really should use.

    The project would involve many enemies from different places on the map all trying to get to the player. These should work kind a RTS were they do not walk into each other, but the enemies do not have to seem smart at all.

    Is there any way this system can be used for a thing like this with C2? and still keep a reasonable load to the CPU?

    If anything is unclear in my question, then please ask and I will clarify everything.

    You could use this path finding or it could be possible to script it using collisions, move to angle and a line object for sight. Many ways to do what you say, experiment!

  • > Was trying to do a bit of Catmull Rom, but it seems the plug has some wonky nodes.

    > Shouldn't they be static after the generation?

    For some reason I didn't notice your post newt, sorry. I'll have a look into this ASAP.

    If you move the "Every 0.1 seconds" events to the end it doesn't fluctuate. The result is basically the tile size multiplied by the grid coordinates so their should be no wonky nodes at all. Wonder why this occurs, obviously the "Every 0.1 seconds" is interfering somehow.