Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
There appears to be a bug with: "On First Drawing Do Something". It repeats the actions over and over, instead of doing them just once. Only noticed it happening since the New-Years' update. As a workaround, you can add variables and If statements to block multiple cycles but it's a bit of a pain - and I'm sure it only used to do one cycle by default (unless you checked "also on reload" - in which case it would repeat the actions whenever the scene reloads). Now it just does them non-stop no matter what you select. |
||||
|
Didn't noticed something like that. Maybe there is something with your project. I tried reproducing it and was not able to do it. Before first drawing seems to work fine for me. cross check if there are any every few seconds do something behavior in your scene and if they are conflicting with the variables used by you in before first drawing do something. |
||||
|
Thanks. I've tried to trouble shoot it for a few days but can't figure out what's wrong. For example, if I place a "play sound (not looped) as a "do on first draw" action, it will loop the sound endlessly. On First Draw (not on reload), Play Sound "1.wav" (not looped) ...As a workaround fix, I can do the following.... On First Draw (not on reload), If "started?" <>1, Play Sound "1.wav" (not looped) Set Variable "started?" =1 The sound will now play just once. I guess it could just be a glitch because I first made the CCB with the 32 bit CCBv6.3 and continued to work it with 64 bit CCBv6.4 - that's when a few problems started happening. I've managed to patch most of them by removing problematic actions and replacing them with "IF" statements for now. |
||||
|
*Only seems to happen with any "Do Later" commands. |
||||
|
can't say much about what's causing the issue. Maybe you can create a sample ccb file so that We can look what's causing the issue. because do Later and before first drawing works completely fine for me. |
||||
|
Definitely a bug on mine - I just realised that it's probably this bug that's causing all the other [bugs?] I reported (such as switch ccb file tec). If I use any "Do Later" in the "Before First Draw", it repeats the "Do Later" indefinitely. EG: Before first draw, Do Later 500ms, Set Variable "Bug" = 1". On Keypress "SpaceBar", Set Variable "Bug" = 0, Update 2D Overlay "Bug = $Bug$" When you start the game, Bug = 1. When you press SpaceBar, Bug = 0. ...but after 500ms, Bug =1 again. I don't think it's meant to do this? - I think it should stay as "Bug = 0" after SpaceBar is pressed. I'll just not use the "Do Later" in the "Before First Draw" Section any more as it causes untold problems with so many different actions/behaviours. It might just be me (if no-one else can replicate the problem), but it happens so often, it's probably worth mentioning it here in case it helps someone else in the future - even my future self as I seem to keep making the same mistake. LOL. |
||||
|
just replied to a post where you were mentioning a similar issue or maybe the same issue. I tried myself reproducing it and unfortunately I was unable to reproduce it as I mentioned above if you can create a sample ccb file and share it then I can tell if you are using it in some unusual way. Anyway, I posted alternate action and a sample demo file in which the action works perfectly. |
||||
|
Thanks buddy! I've just managed to solve it finally. i had tried reproducing the problem into a file and couldn;t manage it. It has cropped up quite a few times in all of my projects (Cas-Evac City level, the Pyramic Level and the Anubis animation). Each time, I've been unsure if it's actually the Before First Draw or the Do something later - or a combination of both. I just asked about the "do something later" issue too but I don't want to become a bore or annoy the forum by constantly mentioning it without providing a test-file as I know there's little anyone can do without seeing the problem first. As a workaround, I fixed it by removing any glitching variables from the "Before First Draw" and using another approach..... Solution - instead of using: before first draw (and on reload): Variable Missile = 0 I deleted it and added it into the game as follows instead: If Variable "Missile" <>1 Now when I fire the missile, I can manually change Variable Missile = 1 It now works, the variable changes as expected. |
||||
|
Glad that you worked it out by yourself, Something similar has been suggested by me in the other thread. and there is nothing wrong to ask again and again until you find the answer to your problems, not an issue and you are not annoying anyone thing is that since Discord Communities have become more active, People asks most of there issue there and sometimes some post got missed I try to answer as many posts as I can whenever I come to the forums but sometimes some posts get missed and then new posts stack over them which makes the post goes unanswered. but its good to see people putting efforts to their game glad that you fixed the problem by yourself. |
||||
|
hey VP <> is not an operator did you mean != as to say: var "Missile" is not 1 |
||||
|
PongTroller wrote: hey VP <> is not an operator did you mean != as to say: var "Missile" is not 1 In editor it is displayed like [Is not equal to(<>)] (Without scripting.) |
||||
|
Thanks just_in_case - really appreciate your time and previous suggestions. Definitely helped me to get it working. I still need to check out the Discord Community, I remember it being mentioned on a thread here quite a while ago, I followed the link but I never got round to signing up. Hi PongTroller Yeah - sorry for the confusion. I'm not really familiar with all the proper syntax/API terms yet, I just meant <> to mean not equal to - as sven says, I'm still only using the built-in actions at the moment, but thanks for pointing it out; it will surely be useful if ever I try to script something for myself - I would have been trying to use <> instead of [!=] in my scripts. |
|