Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 206025 times)

Lord Phantasm Satori

  • Permabanned
  • RIP 7/21/2010-9/10/2010
Re: Danmakufu Q&A/Problem thread number 4
« Reply #210 on: August 05, 2010, 04:56:52 AM »
You can just set up everything so there's only one selectable script, then tell the user "press Z repeatedly until you get to a screen that's not blue." If you delete the default Rumia scripts and don't use any Japanese characters in yours, they won't need applocale.

what about the fact that everything on the main menu is described in japanese?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #211 on: August 05, 2010, 10:29:36 AM »
what about the fact that everything on the main menu is described in japanese?
Look, if you want to make a commercial game, maybe you should use an engine that is made for that ordeal, not an unoptimized, discontinued beta version released by people who designed everything in their mother tongue. Preferrably, use an engine that either explicitly says that you may use it for commercial purposes, or one that you programmed yourself.

Just sayin'.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Beef Owl

  • Why yes, owls do yield beef:
  • It is known as The Strongest White Meat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #212 on: August 05, 2010, 01:57:12 PM »
I have a big a crazy scheme here that I'm pretty sure I'm coding wrong:

Code: [Select]
//Header stuff

let factor = 1.0;
let count = 0;
let score = 0;
let lives = 4;
scorekeeperMake;

loop
{
        if (c < 10)
        {
              pickCard(factor);
        }
        else
        {
              pickBoss(factor);
              c = 0;
        }

        loop(lives == GetPlayerLives && score == scorekeeperValue)
        {}

        if (c == 10 && lives == GetPlayerLives)
                   lives++;
        else
        {
                   lives = GetPlayerLives;
                   score = scorekeeperValue;
                   factor += 0.05;
                   count++;
        }
}

Note that "scorekeeper" is a small script I made (and added with include function) to this script, the plural for my project, that holds the score, outputs it on the sidebar, with a scorekeeperMake method to initialize, a scorekeeperValue to return its value, and a method called scorekeeperCheck called in the Finalize method of each spellcard to add a point if the player didn't die during it.

The pickCard and pickBoss methods are also functions of scorekeeper, and are huge case-statements (hence my last question here) full that select a random spellcard to be next in the script.

The factor variable right now isn't working because I'm unsure about how the spellcards themselves will utilize it; basically I plan to give each card a parameter that makes it more difficult as the parameter's value increases, but right now the parameter isn't used.

Essentially, this is trying to emulate the concept of WarioWare with danmaku :3

I don't quite understand why this isn't working, I'm not even getting error messages when I try to run the script, Danmakufu just crashes. I'm not sure if what I'm trying to do is even gonna work but I'm curious; any ideas?
« Last Edit: August 05, 2010, 02:00:29 PM by Beef Owl »

Re: Danmakufu Q&A/Problem thread number 4
« Reply #213 on: August 05, 2010, 04:22:50 PM »
Your second loop command has a boolean parameter where it should have a number. ==, <, >, <=, >=, &&, !=, and ! will all yield boolean values. One of your if statements is also missing it's braces, but I'm pretty sure you can still do that anyway so it probably doesn't matter.

Beef Owl

  • Why yes, owls do yield beef:
  • It is known as The Strongest White Meat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #214 on: August 05, 2010, 08:08:40 PM »
Your second loop command has a boolean parameter where it should have a number. ==, <, >, <=, >=, &&, !=, and ! will all yield boolean values. One of your if statements is also missing it's braces, but I'm pretty sure you can still do that anyway so it probably doesn't matter.

Um, the boolean parameter is to make it loop until either score or lives change, i.e. the current card ends; kinda like an indefinite wait loop. And also I'm kinda new to danmakufu but don't you not need braces for single line statements? Sorry if I'm completely wrong, I probably coded this like a Java program :V

Nonnie Grey

  • Contradictory Statement
  • The Anonymity formerly known as Kayorei
Re: Danmakufu Q&A/Problem thread number 4
« Reply #215 on: August 05, 2010, 08:19:43 PM »
Um, the boolean parameter is to make it loop until either score or lives change, i.e. the current card ends; kinda like an indefinite wait loop.

I'm no expert myself, but it sounds like you're after a "while" loop, not a regular one.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #216 on: August 05, 2010, 08:34:43 PM »
Um, the boolean parameter is to make it loop until either score or lives change, i.e. the current card ends; kinda like an indefinite wait loop. And also I'm kinda new to danmakufu but don't you not need braces for single line statements? Sorry if I'm completely wrong, I probably coded this like a Java program :V

Like Kayorei said, you're looking for a while statement. Also, I too code in Java and know about the one line if statements, hence why I sorta said it might not matter. I'm not actually sure if it errors in Danmakufu, but I wanted to bring it up in case nothing else works.

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #217 on: August 05, 2010, 09:11:45 PM »
;_;

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #218 on: August 05, 2010, 09:22:02 PM »
;_;
Your code is weird. I would have coded it differently, but this way works just as well if you just fix this little error:

You always set the speed to "calcspeed+acc", yet never change the value of "calcspeed". just get rid of the variable altogether and put "Obj_GetSpeed(obj)" in the places where it is referenced.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #219 on: August 05, 2010, 09:26:28 PM »
You always set the speed to "calcspeed+acc", yet never change the value of "calcspeed".

Goddammit here's the problem. It should be something like calcspeed+=accel.
:colonveeplusalpha:

Thanks once again.

Marco

  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
Re: Danmakufu Q&A/Problem thread number 4
« Reply #220 on: August 05, 2010, 10:22:59 PM »
Sorry but, there are any places of this forum in that I could put some scripts of mine [some? or maybe alll...]. I rode I can make a rar archive and I should correct some but if you want to try...I'll be glad.....
DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #221 on: August 05, 2010, 10:28:06 PM »
Upload you script on www.bulletforge.org and then make a thread in this forum.  :derp:
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Beef Owl

  • Why yes, owls do yield beef:
  • It is known as The Strongest White Meat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #222 on: August 05, 2010, 10:41:38 PM »
I'm no expert myself, but it sounds like you're after a "while" loop, not a regular one.

Omg, I didn't even notice I put loop instead of while, thanks, im smrt :colonveeplusalpha:

Marco

  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
Re: Danmakufu Q&A/Problem thread number 4
« Reply #223 on: August 07, 2010, 12:46:24 AM »
Sorrysorrysorry I have a small problem with variable (I know there are easy but...). Howrever how can I make somethin like:
Code: [Select]
if(forse==no){DeleteEnemyShot(ALL); Concentration02(60);no=0;si++;forse-rand(-10, 10);}no, si and forse are variables (yea I let them).
Please help me with this little problem...
DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI

Re: Danmakufu Q&A/Problem thread number 4
« Reply #224 on: August 07, 2010, 01:18:27 AM »
forse-=rand(-10, 10);

Sejha

  • I think Im a game dev. And Musician.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #225 on: August 07, 2010, 01:47:49 AM »
I'm new round here so bear with me.

Kay, so for a bout a year now I've been working on my own fullgame, called Eternal Twilight. I don't really neeed to say much cept this.

In stage three, I have two bosses, and I want them to fight simultaneously, so, how do I make it so they both appear as destructable enemies, yet still are under the Boss class?
I've evolved a lot. When did I make this account again?

Marco

  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
Re: Danmakufu Q&A/Problem thread number 4
« Reply #226 on: August 07, 2010, 01:57:49 AM »
forse-=rand(-10, 10);
thanks [I'm going to kill me....this mistake is so ⑨ (⑨=stupid;)
DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #227 on: August 07, 2010, 02:20:50 AM »
I'm new round here so bear with me.

Kay, so for a bout a year now I've been working on my own fullgame, called Eternal Twilight. I don't really neeed to say much cept this.

In stage three, I have two bosses, and I want them to fight simultaneously, so, how do I make it so they both appear as destructable enemies, yet still are under the Boss class?

I'm pretty sure running two boss scripts simultaneously is impossible, since Danmakufu's tailored to single bosses. For example, the GetEnemyX (and GetEnemyY) value can't be two different numbers at the same time.

Of course, using some clever programming, you can make it look as if two bosses are onscreen by making one of your enemies the familiar of the other, but it's not the same thing.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #228 on: August 07, 2010, 02:23:10 AM »
In stage three, I have two bosses, and I want them to fight simultaneously, so, how do I make it so they both appear as destructable enemies, yet still are under the Boss class?

You'll spawn one boss as an enemy during the boss script. So you'll spawn your boss using CreateEnemyBossFromFile, and then inside the boss script, you'll use CreateEnemyFromFile (or CreateEnemyFromScript) to spawn the other boss. To make it so they both operate under the same health bar, you'll use SetDamageRate() for the "main" boss, and SetDamageRateEx() for the "sub" boss. SetDamageRateEx allows the main boss to take the same damage as the sub boss (and since the main boss will automatically kill the sub boss when it dies, there is no reason to transfer damage the other way). If you want the sub boss to be at the same point at the start of the following attack, you'd need to set its coordinates in common data at the end of the previous attack and then respawn it in the next script at those coordinates, in @Initialize.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #229 on: August 07, 2010, 04:52:52 AM »
Just spawn one boss enemy and keep track of two different sets of coordinates (instead of using GetEnemyX etc, create your own variables and movement functions). Then just SetCollisionA/SetCollisionB twice, once for each set. As a last touch, SetEnemyX/SetEnemyY to whichever of the two locations the player is closest to, so homing player scripts will work correctly.

Sejha

  • I think Im a game dev. And Musician.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #230 on: August 07, 2010, 12:37:17 PM »
You'll spawn one boss as an enemy during the boss script. So you'll spawn your boss using CreateEnemyBossFromFile, and then inside the boss script, you'll use CreateEnemyFromFile (or CreateEnemyFromScript) to spawn the other boss. To make it so they both operate under the same health bar, you'll use SetDamageRate() for the "main" boss, and SetDamageRateEx() for the "sub" boss. SetDamageRateEx allows the main boss to take the same damage as the sub boss (and since the main boss will automatically kill the sub boss when it dies, there is no reason to transfer damage the other way). If you want the sub boss to be at the same point at the start of the following attack, you'd need to set its coordinates in common data at the end of the previous attack and then respawn it in the next script at those coordinates, in @Initialize.
Ah, I think this may be the best route to take.
Thank you for the advice!
I've evolved a lot. When did I make this account again?

Marco

  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
  • DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI
Re: Danmakufu Q&A/Problem thread number 4
« Reply #231 on: August 09, 2010, 02:23:38 PM »
Sorry...I've lots of problems.....Can someone tell me how "wait" works?
Code: [Select]
Wait(120);
Please help me Eirin!
DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI DANZAI

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #232 on: August 09, 2010, 02:38:22 PM »
Sorry...I've lots of problems.....Can someone tell me how "wait" works?
Code: [Select]
Wait(120);
Please help me Eirin!

Wait does actually not exist in the regular danmakufu. It is just a function many scripters define in their scripts to make their script shorter.

You need to define it somewhere in your script, like this:

Code: [Select]
function Wait(t){ loop(t){ yield; } }

I should say here that danmakufu DOES have a Wait command, but it is a completely unrelated command that does nothing outside of Event scripts, so you still need to define Wait (or wait) if you want to use it the way most people use it: To delay tasks.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #233 on: August 09, 2010, 03:35:20 PM »
It's me again and I still have problems with Non-Spell Scripts...
I just made a new non-spell Single script and tried to run it in Danmakufu.
It didn't work.
I got an error message which says that there would be a mistake in the highlighted part of the script.
After 2 hours of rechecking the script bazillions of times, I still didn't get it to work and I think I need help now :S

Sorry for the huge amount of code...I didn't know how to create a "spoiler" button. ???

Quote
(...)   task mainTask{
         wait(120);
         yield;
         movement;
         fire;
            }
         
         task movement{
               loop{
                 


               
               SetMovePositionRandom01(100, 80, 5, GetCenterX-120, GetCenterY-130, GetCenterX+120, GetCenterY-50);
               wait(90);
               yield;
                     }
                        }
      
   task fire{
            let y = 0;
            let dir = 0;
            
            loop{
            while(y<10){
            ?
                        CreateShotA(01,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
                        SetShotDataA(01,0,6,dir,-0.2,-2,1,RED09);
                        FireShot(01);
                        
                        CreateShotA(02,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),5);
                        SetShotDataA(02,0,6,dir,0.2,-1,4.5,RED09);
                        FireShot(02);
                           wait(5);
               
                        dir+=360/36;
               
                        y++;
               }
                  y = 0;
                  dir = 0;
                  yield;
               }
               
               
            }
      

   
   function wait(w){
      loop(w){yield;}
   }
}  // This bracket is for script_enemy_main...


Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #234 on: August 09, 2010, 03:53:02 PM »
<snip>

On the spot, I can't see something that would cause danmakufu to spit out an error. You may want to show us the actual error message (you can press ctrl+c if an error show up and it will be copied), as well as checking the lines before the error you got.


On a general, unrelated note, I want you to look at the wait function in your script, what it is defined as, and what it does in your script. I then want you to look at the places where you put a yield; directly after a wait(n);.  :derp:
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #235 on: August 09, 2010, 04:54:36 PM »
@Grumskiz, It would be wise to actually post large scripts in pastebin.org This way we can simply copy/paste the code and test ourselves as well.

This goes for everybody who is posting big chunk of code that covers the screen.

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #236 on: August 09, 2010, 04:56:27 PM »
Either posting the error message or the entire code is a good idea. Sometimes a missing bracket or semicolon near the top can ruin everything.
And there seems to be a random apostrophe or single quotation mark in the while loop.

Lastly, I'm just being nitpicky here, but this part
Code: [Select]
            let y = 0;
            while(y<10){
                        CreateShotA(01,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
                        SetShotDataA(01,0,6,dir,-0.2,-2,1,RED09);
                        FireShot(01);
                       
                        CreateShotA(02,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),5);
                        SetShotDataA(02,0,6,dir,0.2,-1,4.5,RED09);
                        FireShot(02);
                           wait(5);
               
                        dir+=360/36;
               
                        y++;
               }
                  y = 0;

could easily be replaced by

Code: [Select]
           loop(10){
                        CreateShotA(01,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
                        SetShotDataA(01,0,6,dir,-0.2,-2,1,RED09);
                        FireShot(01);
                       
                        CreateShotA(02,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),5);
                        SetShotDataA(02,0,6,dir,0.2,-1,4.5,RED09);
                        FireShot(02);
                           wait(5);
               
                        dir+=360/36;
               }

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #237 on: August 09, 2010, 05:15:56 PM »
Code: [Select]
loop{
            while(y<10){
            ?    //THIS RIGHT HERE
                        CreateShotA(01,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
                        SetShotDataA(01,0,6,dir,-0.2,-2,1,RED09);
                        FireShot(01);

Is that a random apostrophe?

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #238 on: August 09, 2010, 06:22:36 PM »
That apostrophe...I don't not know where it came from^^
But it is not in the actual script file...
@Helepolis
Yeah, after I posted I asked a friend on skype and he reminded me of pastebin   :ohdear:

@Flashtirade
I'm very new to scripting and especially to Danmakufu and I didn't even know, if my fire-task loop works.
Anyway, thanks for the advice ;3

@Iryan
I think there isn't any mistake in the part above the quoted one, but if I can't get it to work in near future, I will upload the whole script on pastebin and ask you again :S


5 Minutes later:
Thanks Iryan!
I replaced the yield; in the movement-task outside of the loop and fixed a typo mistake and...It works...kinda
I now have to adjust some parameters and change the whole movement for this script.(copy-pasted it from an earlier one^^)
You all answered really fast, so thanks to you =D


Formless God

Re: Danmakufu Q&A/Problem thread number 4
« Reply #239 on: August 10, 2010, 04:55:33 AM »
Code: [Select]
let obj1=Obj_Create(OBJ_SHOT);
      let obj2=Obj_Create(OBJ_SHOT);

      Obj_SetPosition(obj1, x, y);
      Obj_SetAngle(obj1, angle);
      Obj_SetSpeed(obj1, v);
      ObjShot_SetGraphic(obj1, graphic);
      ObjShot_SetDelay  (obj1, 10);
      ObjShot_SetBombResist (obj1, true);

      while(Obj_BeDeleted(obj1)==false) {
              if(Obj_GetX(obj1)<GetClipMinX+4) {
                     Obj_Delete(obj1);

                     Obj_SetPosition(obj2,Obj_GetX(obj1),Obj_GetY(obj1));
                     Obj_SetSpeed(obj2, Obj_GetSpeed(obj1));
                     ObjShot_SetGraphic(obj2, graphic);
                     ObjShot_SetDelay(obj2,0);
                     ObjShot_SetBombResist(obj2,true);

                     Obj_SetAngle(obj2, 180 - Obj_GetAngle(obj1) );
                     Obj_SetX(obj2,  Obj_GetX(obj1) + 0.1);
              }

              if(Obj_GetX(obj1)>GetClipMaxX-4) {
                     Obj_Delete(obj1);

                     Obj_SetPosition(obj2,Obj_GetX(obj1),Obj_GetY(obj1));
                     Obj_SetSpeed(obj2, Obj_GetSpeed(obj1));
                     ObjShot_SetGraphic(obj2, graphic);
                     ObjShot_SetDelay(obj2,0);
                     ObjShot_SetBombResist(obj2,true);
                     Obj_SetAutoDelete(obj2,true);

                     Obj_SetAngle(obj2, 180 - Obj_GetAngle(obj1) );
                     Obj_SetX(obj2,  Obj_GetX(obj1) - 0.1);
              }
              yield;
       }
This creates indestructible bullets that bounce off walls only once. Is there any way to make it shorter ? Another problem is that the bullets don't get erased when they go off-screen (even with Obj_SetAutoDelete set to "true"). Can anyone check this for me as well ?