Jump to content

Photo

What was your first script? (Question for Scripters)


  • Please log in to reply
10 replies to this topic

#1 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 26 June 2018 - 07:02 PM

There are a lot of talented, and creative scripters in our community. But you all had to start somewhere, right? What was your first script like? What aspect of scripting did you try to tackle first? Items, enemies, puzzles, cutscenes, or maybe a whole new play style? Did you have any prior programming experience, or was this your first foray into coding?

 

Oh, and you don't have to literally post your first script, unless you want to. Describing it is fine too. :P



#2 Architect Abdiel

Architect Abdiel

    Kingdom Builder

  • Members
  • Real Name:Michael
  • Location:Florida

Posted 26 June 2018 - 07:17 PM

Both of the scripts I've put together, I've had some guidance putting together. The first one I can say I did a lot of writing myself was the Trident script from a few weeks ago. It gave my trident weapon the ability to break shields with itself or its beams. But it's only able to stab.

#3 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 26 June 2018 - 07:51 PM

I didn't start with writing my own scripts, but by editing scripts other people wrote to suit my needs. For example, Mero's lava/pit script is infamous for how buggy it is, so making it work for what I needed it to do and adding a new combo type (deep water) required me to closely look at the code to determine exactly what every line of code does. Once you start to get a feel for the language, writing your own scripts starts to become much easier. Most of the scripts I write, now, are built on older stuff I've done, just tweaked. Like, the one I sent you is built off of my upgrading drop script. Speaking of, upgrading drops might have been my first one that worked.

Edit: Oh, also, wasn't my *first* foray into coding, but all I had to build on was a smattering of HTML that I learned when I was 10. So was definitely a newbie.

Edited by Binx, 26 June 2018 - 07:56 PM.


#4 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 26 June 2018 - 09:12 PM

Going off the order things appeared in YOLO's script buffer my first script was a horrible abomination of a global script that takes away sword items based on Link's MP among other things. I'm not gonna count that because it serves no singular purpose and I can't be sure what parts were added when.

 

So then the first real script I wrote was a Phanto FFC. It checks if Link has a key and if so changes the FFC's X and Y velocity based on its position in relation to him every frame.

 

It also has awful, inconsistent indenting. Every single script in this abomination of a quest. Why did you make me look at this!? 


  • Anthus, Binx and ywkls like this

#5 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 26 June 2018 - 09:29 PM

My first script(s) were for an attempt at Deadman's Volley back in the original two week incarnation of Light of the Heavens over 7 years ago. They were awful. Instead of actually scripting it properly, I had a series of screens 2.10 style with a projectile going towards Link (stuck on a 1x2 platform), and a projectile going back up towards the boss, with scripts that would advance you to the next screen if you hit A at the right time. I also tried manually drawing the sword on A press for... reasons. Also a button mash sequence.
 
int ballx;
int bally;

ffc script ballcomingdown{
	void run(int dmapnumber, int screennumber){
		while(true){
			if (Link->X > this->X-1 && Link->X < this->X+16 && Link->Y > this->Y && Link->Y < this->Y+32 && Link->InputA == true) {
				Waitframes(10);
				ballx = this->X; bally = this->Y;
				Link->PitWarp(dmapnumber, screennumber);
			}
			else if (Link->X == this->X && Link->Y == this->Y){
				Game->PlaySound(19);
				Link->HP -= 16;
			}
	Waitframe();	}
	}		
}

ffc script ballgoingup{
	void run(){
		this->X = ballx;
		this->Y = bally;
	}
}

ffc script ballgoingup2{
	void run(int ffcx, int ffcy, int dmapnumber, int screennumber){
		this->X = ballx;
		this->Y = bally;
		while(true){
			if (this->X == ffcx && this->Y == ffcy){
				Link->PitWarp(dmapnumber, screennumber);
			}
		Waitframe();}
	}
}

ffc script sworddeflect{
	void run(){
		int xposition = Link->X; int yposition = Link->Y-16;
		Screen->DrawCombo(2, xposition, yposition, 4536, 1, 1, 8, -1, -1, 1, 1, 0, 1, 0, false, 128);
	}
}


ffc script differentending{
	void run(int dmapnumber, int screennumber){
		Link->InputA = false;
		Waitframes (60);
		while(true){
			if (Link->Item[7] == true && Link->InputA == true && Link->Dir == 0){
				Link->PitWarp(dmapnumber, screennumber);
			}
		Waitframe();}
	}
}

ffc script damage{
	void run(){
		while(true){
			if (Link->X > this->X - 1 && Link->X < this->X + 16 && Link->Y > this->Y - 1 && Link->Y < this->Y + 32){
				Game->PlaySound(19);
				Link->HP -= 8;
				Waitframes(60);
			}
		Waitframe();}
	}
}

ffc script pressa{
	void run(int dmapnumber, int screennumber){
		int acount;
		while(true){
			if (Link->InputA == true){
				acount += 1;
			}
			if (acount == 60 || acount > 60){
				Link->Warp(dmapnumber, screennumber);
			}
		Waitframe();}
	}
}
I want to go back in time and strangle my younger self. Thanks for making me relive this.

#6 The Satellite

The Satellite

    May the way of the Hero lead to the Triforce.

  • Members
  • Real Name:Michael
  • Pronouns:He / Him

Posted 26 June 2018 - 09:33 PM

Well you see, the first script I ever wrote was as a teenager when I had this goofy idea to make a nonsensical short Star Wars film using only toys—

 

... oh. ZScript. Carry on.


  • Anthus, Binx and Architect Abdiel like this

#7 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 June 2018 - 09:43 PM

I started back when there was only ZASM, but I don't remember anything I successfully did with that. I know I tried making a Beamos once, but I never got it working. I think the first ZScript scripts I wrote were the chaser trap and vacuum. They were originally for NeoFirst, back when that was a thing

#8 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 26 June 2018 - 11:54 PM

I love how everyone's complaining about how bad their early scripts were, and I'm over here, like "At least your guys' scripts frigging worked!"

 

EDIT: Ok, this seems to be the first function I ever wrote, by cannibalizing someone else's smart drop code:
 

void AutoSwordUpgrade() //FTR, the function declaration wasn't in the original version, it was just a chunk of my global, but it hurt trying to put this up without it.
{
for ( int i = 1; i <= Screen->NumItems(); i++) 
			{ 

				item drop = Screen->LoadItem(i);
				
                if ( (drop->ID == I_SWORD1 && !Link->Item[I_SWORD1])) 
                    Remove (drop); //This checks if you have the wooden sword, if not, it removes the drop
                if ( (drop->ID == I_SWORD1 && Link->Item[I_SWORD1]))
                    drop->ID = I_SWORD2; //This checks if you have the wooden sword, if you do, it changes the picked up item to the white sword
                if ( (drop->ID == I_SWORD2 && Link->Item[I_SWORD2]))
                    drop->ID = I_SWORD3; //THis checks if you have the white sword, if you do, it replaces it with the magic sword
                if ( (drop->ID == I_SWORD3 && Link->Item[I_SWORD3]))
                    drop->ID = I_SWORD4;  //This checks if you have the magic sword, if you do, it replaces it with the master sword 
 
			}
}

But I don't think first scripts are really the worst we have, personally. They're usually fairly simple, comparatively, and I think that right around the time I was starting to do things more independently, stuff went right to hell. I don't even think I have the original SFDS XP and character switching scripts because they were just so broken it was easier to scrap them and start over than fix them.


Edited by Binx, 27 June 2018 - 12:18 AM.


#9 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 27 June 2018 - 12:31 PM

I believe the first script I ever wrote simply played an SFX when the player entered a screen. I recommend you start simple, and work your way up.



#10 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 28 June 2018 - 06:22 AM

Somewhat amusing:

 

My first scripts were ZASM, long, long ago, before ZScript's C syntax was fully-wrought.

 

For the C style, modern ZScript, I started with items, and special effects in the global active script.


  • Anthus likes this

#11 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 29 June 2018 - 06:35 PM

My first script was Heart of Aquamentus, a terrible abomination that brings only nightmares and pain.

A year later I made a custom boomerang that was actually pretty cool.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users