Jump to content

Photo

Help combining Global Scripts


  • Please log in to reply
3 replies to this topic

#1 Vivi (Floating)

Vivi (Floating)

    Newbie

  • Members
  • Real Name:David
  • Location:Venezuela, Bolivar

Posted 05 May 2016 - 04:10 PM

I try hard to comprehend how combining Global Scripts work, but alas, I cannot get the hang of it entirely. What I need is to combine these three scripts.

 

Ice Combos

Spoiler

 

Moving Platforms

Spoiler

 

Pits and Lava

Spoiler

 

Ghost.zh

Spoiler

 

If anyone could help me here, I would give you all of my thanks!



#2 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 06 May 2016 - 12:08 AM

By your powers combined, I am Meropits


I really hate Meropits. And for future reference...
 
global script ActiveSlot2
{
	void run()
	{
		// -----------------------------------------------------------------------------------------------------------------------
		// SECTION 1: BEFORE WHILE (TRUE)
		// -----------------------------------------------------------------------------------------------------------------------
		// The code here is run once upon game start. That means it will run when you start the quest, and again every time you F6.
		
		while (true)
		{
			// -----------------------------------------------------------------------------------------------------------------------
			// SECTION 2: BEFORE WAITDRAW()
			// -----------------------------------------------------------------------------------------------------------------------
			// The code here is run continuously while the game is running. Certain code has to be put before Waitdraw().
			
			Waitdraw();
			
			// -----------------------------------------------------------------------------------------------------------------------
			// SECTION 3: AFTER WAITDRAW()
			// -----------------------------------------------------------------------------------------------------------------------
			// This section is also run continuously.
			
			Waitframe();
		}
	}
}
Look at the global active portion of whatever global script you want to combine with something else. Look at what goes in each "section". You have to create a new global script for your Active slot (sometimes called slot2) that groups all the bits from the globals you want to combine into their respective sections. As for the pieces that fall outside the global Active script, you can just copy and paste those into your script file without any regard for order. It's up to you how you want to organize those parts.
  • MoscowModder and DragonDePlatino like this

#3 Vivi (Floating)

Vivi (Floating)

    Newbie

  • Members
  • Real Name:David
  • Location:Venezuela, Bolivar

Posted 08 May 2016 - 10:36 AM

That helped a lot. Thanks!

 

I shall take the combination indications in mind too. :D



#4 Yloh

Yloh

    My Face!!!

  • Members
  • Real Name:Michael
  • Location:Mike's Fun House

Posted 18 September 2016 - 11:12 PM

Thanks a lot Lejes! With your guide, I figured out how to combine ghost.zh with my other two global scripts.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users