Jump to content

Photo

Trying to combine global script


  • Please log in to reply
12 replies to this topic

#1 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 23 May 2024 - 04:33 PM

I'm trying to combine global scripts, but i have no idea how to do that. Can anyone to help me?



#2 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 23 May 2024 - 05:17 PM

There's a guide for doing it here. You could also give Moosh's Global Script Organizer a try.



#3 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 23 May 2024 - 05:25 PM

Thanks!



#4 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 01:02 PM

Okay. I'm using the moosh thing, but when i compile. It says [Error] NewbieBoss.zs Line 3310 @ Columns 3-13 - Error S009: Variable Ghost_CSet has not been declared. Am i missing something?



#5 Matthew

Matthew

  • Administrators
  • Real Name:See above.
  • Pronouns:He / Him
  • Location:Ohio

Posted 24 May 2024 - 01:59 PM

Are you importing ghost.zh in your header? Have you configured the necessary constants within ghost.zh? I believe newbie boss relies on ghost.zh to function, so you'll want to make sure that's being included.



#6 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 02:30 PM

I think so... I imported the Ghost2_script.zs. Is there anymore ones i should import? Or am i doing something wrong?



#7 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 24 May 2024 - 04:00 PM

You need to import ghost.zh itself. It will import all the sub-files it needs.



#8 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 04:05 PM

And... How can i do that?



#9 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 24 May 2024 - 06:06 PM

You literally just have to put it as an import. import "std.zh", or include, just like you would with, say, std.zh.



#10 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 06:14 PM

Oh. I am trying to combine it with other global scripts.

Sorry for the confusion.



#11 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 24 May 2024 - 06:50 PM

Oh. Well that's fairly easy. The ghost global looks basically like this:

 

global script Ghost{
    void run(){
        StartGhostZH();
        while(true){
            UpdateGhostZH1();
            Waitdraw();
            UpdateGhostZH2();
            Waitframe();
        }
    }
}

 

What that means is, with your global, you just need to put StartGhostZH(); before your while(true){, put UpdateGhostZH1(); anywhere between while(true){ and Waitdraw();, and UpdateGhostZH2(); anywhere between Waitdraw(); and Waitframe();.



#12 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 07:09 PM

Thank you!


...The Error is still happening...



#13 Pjthehuman

Pjthehuman

    Initiate

  • Members
  • Pronouns:He / Him

Posted 24 May 2024 - 07:55 PM

Should i send the full script combo thing?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users