Skip to content
  • 0 Unread 0
  • Recent
  • Popular
  • Users
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. lazily call gsc functions

lazily call gsc functions

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
8 Posts 2 Posters 47 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • yri5 Offline
    yri5 Offline
    yri5
    wrote last edited by yri5
    #1

    i am trying to call functions from other gsc files but they are for the dlcs and will not be loaded on other maps eg origins will have the one punch file but tranzit wont and i wanna be able to call the functions somehow without copy pasting the stuff from the other gsc files

    some examples of stuff i use
    // self thread maps\mp\zombies_zm_weap_one_inch_punch::one_inch_punch_melee_attack();
    // self maps\mp\zombies_zm_weap_beacon::player_give_beacon();
    // level thread maps\mp\zm_tomb_craftables::quadrotor_watcher(self);
    // maps\mp\zm_tomb_craftables::onfullycrafted_quadrotor(self);

    note: i am new to this so please forgive me if this is a bad question

    1 Reply Last reply
    0
    • Hadi77KSA Offline
      Hadi77KSA Offline
      Hadi77KSA
      Contributor
      wrote last edited by
      #2

      You can utilise map-specific folders, for example: scripts\zm\zm_tomb. This is mentioned here

      Alternatively, you can utilise Plutonium’s added function named: getFunction. This is documented here

      yri5 1 Reply Last reply
      1
      • Hadi77KSA Hadi77KSA

        You can utilise map-specific folders, for example: scripts\zm\zm_tomb. This is mentioned here

        Alternatively, you can utilise Plutonium’s added function named: getFunction. This is documented here

        yri5 Offline
        yri5 Offline
        yri5
        wrote last edited by
        #3

        Hadi77KSA said:

        You can utilise map-specific folders, for example: scripts\zm\zm_tomb. This is mentioned ...

        Alternatively, you can utilise Plutonium’s added function named: getFunction. This is documented ...

        got it, im going to assume this is the only 2 ways to do it?

        Hadi77KSA 1 Reply Last reply
        0
        • yri5 yri5

          Hadi77KSA said:

          You can utilise map-specific folders, for example: scripts\zm\zm_tomb. This is mentioned ...

          Alternatively, you can utilise Plutonium’s added function named: getFunction. This is documented ...

          got it, im going to assume this is the only 2 ways to do it?

          Hadi77KSA Offline
          Hadi77KSA Offline
          Hadi77KSA
          Contributor
          wrote last edited by
          #4

          yri5 there are more such as storing the function pointer into a global variable or replacing an existing map-exclusive script, but those aren’t really necessary considering the options I mentioned in the first reply.

          yri5 1 Reply Last reply
          0
          • Hadi77KSA Hadi77KSA

            yri5 there are more such as storing the function pointer into a global variable or replacing an existing map-exclusive script, but those aren’t really necessary considering the options I mentioned in the first reply.

            yri5 Offline
            yri5 Offline
            yri5
            wrote last edited by yri5
            #5

            Hadi77KSA said:

            yri5 there are more such as storing the function pointer into a global variable or replacing an existing map-exclusive script, but those aren’t really necessary considering the options I mentioned in the first reply.

            well i am making this script for the xbox 360 as'well which has no getFunction or replaceFunc; i am avoiding replacing map specific stuff

            Hadi77KSA 1 Reply Last reply
            0
            • yri5 yri5

              Hadi77KSA said:

              yri5 there are more such as storing the function pointer into a global variable or replacing an existing map-exclusive script, but those aren’t really necessary considering the options I mentioned in the first reply.

              well i am making this script for the xbox 360 as'well which has no getFunction or replaceFunc; i am avoiding replacing map specific stuff

              Hadi77KSA Offline
              Hadi77KSA Offline
              Hadi77KSA
              Contributor
              wrote last edited by
              #6

              yri5 I wouldn’t know then in that case as I don’t have experience with modding the game on console.

              yri5 1 Reply Last reply
              0
              • Hadi77KSA Hadi77KSA

                yri5 I wouldn’t know then in that case as I don’t have experience with modding the game on console.

                yri5 Offline
                yri5 Offline
                yri5
                wrote last edited by
                #7

                Hadi77KSA said:

                yri5 I wouldn’t know then in that case as I don’t have experience with modding the game on console.

                what do you mean by "storing the function pointer into a global variable"

                Hadi77KSA 1 Reply Last reply
                0
                • yri5 yri5

                  Hadi77KSA said:

                  yri5 I wouldn’t know then in that case as I don’t have experience with modding the game on console.

                  what do you mean by "storing the function pointer into a global variable"

                  Hadi77KSA Offline
                  Hadi77KSA Offline
                  Hadi77KSA
                  Contributor
                  wrote last edited by
                  #8

                  yri5 see level.check_valid_spawn_override and similar in the vanilla scripts.

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Unread 0
                  • Recent
                  • Popular
                  • Users
                  • Donate