tarek2's Forum Posts

  • This thread is about C3, not C2. Any export issues in C2 will be a separate issue.

    Ok cool, I thought that it may it could be related and help investigate the problem but now that I read the twg comment again I think I misread the Part where he says "HTML5 exports failing" he wasn't axially talking about an Error log with "HTML5 exports failing" like in my case that I got the error Log with the exact same words "HTML5 exports failing" that's why I linked both issues as both c3 & c2 uses the same engine

  • Weird Yesterday I been experiencing this exact problem but with C2 after I update to the last beta R261

    I find it weird because I was just trying to Preview the Game and not exporting it so It couldn't load the Game and it was displaying the Error "HTML5 exports failing" which I found it very strange because I wasn't exporting anything just previewing, I'm not sure if this is related to this thread though.

    I had like 5 Capx projects open but the Preview problem it was just affecting one of them only

    ho yeah apart from "HTML5 exports failing" it was saying something about js Missing, I should have taken a Picture to post it here

  • R0J0hound dop2000 Awesome Ideas Thank you guys I really appreciate your help

    I was really hoping to avoid any extra loops as the problem is that I have to modify many variables at the same time using a Loop quite often, not just one and with this, I have to create a Loop inside a Loop for each variable it will be a bit overkill

    Dop2000 thanks for the Link I did run some testing with Regex but it doesn't work for me is probably me that I haven't got much experience with Regex I just starting experimenting with it the last two days I have no idea how it works though.

    If any of you have any Idea how to make it work with regex will be awesome

    This is what I got so far using the example on the link

    Capx:

    https://www.dropbox.com/s/mj3380lz01womdq/Regex%20Problem1.capx?dl=0

    Thanks Again

  • Hi there,

    Is there any way to Replace a Value inside a string that is separated by a comma ","

    Example:

    Global Variable as a Txt

    Prizes: "1, 3, 5, Top, 6, 6, 6"

    if I need to change the index 4 which is equal to the first 6 and swap it with 9

    The Result will be >>> Prizes: "1, 3, 5, Top, 9, 6, 6"

    I tried already with Expressions (Replace and Regex) but I couldn't get it to work and I couldn't find the answer searching on the Forum either

    I have been a few days with this but no luck I tried things like

    replace(Prizes, tokenat(Prizes, 4, ",") , "9")

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • q3olegka

    I'm not sure if you haven't checked yet but Has been an Update for C3 today, especially check the part

    Performance: C3 runtime: optimise creating and destroying large numbers of instances with behaviours

    https://www.construct.net/wf/make-games/releases/beta/r112

    I guess it was something to do with creating and destroying objects, it should work about the same FPs now.

    Still, on my test, the C2 works just slighter better and smoother as the C3 test every 15 secs or so it drops from 75 to 68 Fps causing a bit of the junk while the c2 test is standing stable on 75 Fps

    is not much of a difference though, I'm pretty sure C3 will get better in the future

  • Is the deceleration you trying to do when the distance is less Than 50 is because you trying to stop the object? or because you trying to that effect?

    I wouldn't use the bullet either for this situation as Dop2000 said the bullet is more as a constant movement you need some behaviour that has more supports for deceleration

    Have you tried the (move at Angle)

    https://www.dropbox.com/s/13hebrbvquv6oo5/StopBulletOnDestination.capx?dl=0

    if you really need the deceleration when the distance is 50 or less just add another condition (Dist <= 50) and do the deceleration on there

    And here you don't really need the rotation like the bullet you can just set the Angle, you can remove the rotation if you like

  • tarek2

    Yeah, sorry, I realized my mistake and updated my post, but you had already commented on it :)

    .

    Yes, the "Else" will not run if at least one picked instance has Class & "_AtKR" animation. So the event should probably look like this:

    > Pick AdventurerSprite with animation NOT EQUAL to Class&"_AtKR" 
    -> AdventurerSprite set animation Class&"_AtKR"
    

    No problem mate :)

    I agree Putting the Else on those situations is very confusing it made me doubt for a bit haha

    I will leave a capx showing what we were talking about to raikoification so he can understand it better as it can be really hard to understand

    Capx: https://www.dropbox.com/s/neryqc35djepnnp/%28Else%29%20Problem.capx?dl=0

  • tarek2, I believe the "Else" event will be executed is there are any instances of AdventurerSprite (picked by parent events), which have animations different from Class & "_AtKR".

    dop2000

    For what I know the (Else) only Runs when the Parent Event is False so as longs it finds at last 1 of them with animation = Class & "_AtKR" the (Else) it will never Run, but now you make me wonder I will run some test to make sure is right as I posted really quick & I might be wrong

  • The Events where you Change Animation they look very confusing I'm not sure if you misunderstood the how it works the (Else) but here is the translation of your events and see for yourself if that is what you intended to do.

    Event(62)Pick any AdventurerSprite.AnimationName = Class & "_AtKR" >>>> And do nothing

    Event(63) Else: (Every time that you cannot find any AdventurerSprite at all Playing = Class & "_AtKR") Pick all the sprites that meet the condition (Sprite = Attacking & Sprite.aAngle <= 19) and set their Animation to Class & "_AtKR"

    So here you have a problem while it finds at last 1 of them meeting these three conditions

    Sprite = Attacking

    Sprite.aAngle <= 19

    AnimationName = Class & "_AtKR"

    The else it will never Run

    ==============================================

    For the rest of the events set attacking & in combat they are confusing swell. the best thing is to explain in simple words what you trying to do exactly and someone here will help you with the Logic

  • so this is my starting event

    and then i have these two events to change the states of units based on proximity

    however when this event triggers, it sets the state for every "Adventurer" object instead of just the one that is within distance

    is there any way to make it so the event only applies to objects that trigger the event instead of every single object of that type?

    The two events to change the states of units based on proximity can be true at the same time when is less than 60, in the event that you check (dist 500) you should add another condition that checks distance is greater than 60 and lower than 500, alternative you can use the system >>> (is between values) & PrePick The Objects On the conditions

    Here is an example

    https://www.dropbox.com/s/z5opdrs1u6w69y8/PickByDist1.png?dl=0

  • > New Runtime as is still on Alpha testing

    Yes, but I thought that fps would be roughly equal

    I'm not an expert or anything like that, this is only my point of view I could be wrong though.

    If it was at last on a beta test you could spect that

    but as is an Alpha test it could have hundreds of bugs preventing c3 new Runt time riching his Pick Performance I guess. it's very unstable yet.

    For the results of the test showing C2 outperforms C3 with that huge Difference is very clearly that has still a lot of bugs and optimisations yet to fix, or at last, I hope so.

    I base my thoughts from the C3 Run Time blogs showing all the Results of a huge Performance gain in most of the areas I don't think they will risk showing those results if it wasn't true

  • Mnm Interesting I got unexpected results too, I guess they still haven't tweaked properly yet the c3 New Runtime as is still on Alpha testing

    C2 Results: https://www.dropbox.com/s/g7shhngshvcd54z/C2%20Test.png?dl=0

    C3 Results:https://www.dropbox.com/s/0yjfkkuej3zrys3/C3%20Test.png?dl=0

  • Woow That looks really awesome, I needed something like that recently, is perfect just in time :)

  • You do not have permission to view this post

  • For Example, I created a sprite when the PathFinding starts. "-1" is where the Arrow started. However, no line was created and "0" is where it starts.

    It Should start at -1 not 0

    Screenshot: s22.postimg.cc/ybgipix41/line.jpg

    The Index of the PathfinderNodes starts counting from 0 so you gonna have to link the object -1 to the Node(0) Manually

    Probably on path Found>>> the sooner you create the (-1 object) link it to the Pathfinder.Node(0)