Jump to content

Photo

eSword

FFC

  • Please log in to reply
4 replies to this topic

#1 SpacemanDan

SpacemanDan

  • Members
  • Gender:Male
  • Location:Ontario, Canada

Posted 31 July 2012 - 09:47 PM

eSword

By dragonsword

Description

Now, you can make an enemy that actually holds a weapon instead of trying to randomly run into you! What it does: creates an enemy on the screen and makes it wield a sword! The enemy will always re-appear whenever you re-enter the screen unless another script sets Screen->D[0] to something besides 0.

Screenshots and Demo

N/A

Code

Code


Setup

D0: ID of the enemy.
D1: Starting X position.
D2: Starting Y position.
D3: How many pixels ahead of the enemy the sword is. (11-14 are good numbers)
D4: ID of the sprite to use.
D5: Damage the weapon does in quarter hearts.
D6: How many frames the enemy waits before re-stabbing the sword if it hit something.

Resources

There are no extra resources required.

#2 imanualtongi

imanualtongi

    User-requested ban.

  • Banned
  • Real Name:Imanual
  • Gender:Male

Posted 29 August 2012 - 10:50 PM

I am using zquest 2.50 beta build 22. I selected everything in the code dropdown, copied it to a new text document , and saved it as esword.z
When i import it and try to compile it, i get the error:
IPB Image

Edited by imanualtongi, 29 August 2012 - 10:52 PM.


#3 SpacemanDan

SpacemanDan

  • Members
  • Gender:Male
  • Location:Ontario, Canada

Posted 29 August 2012 - 10:51 PM

You need to put...

CODE
import "std.zh"


...at the top of your script file. icon_smile.gif

#4 Yoshi

Yoshi

    Hero of Time

  • Members
  • Gender:Unspecified

Posted 31 August 2012 - 03:47 PM

I used this script, and it works great, except that the weapon sprite is wrong. How do I fix this?

#5 FnrrfYgmSchnish

FnrrfYgmSchnish

    Junior

  • Members
  • Gender:Male

Posted 22 January 2014 - 05:06 PM

Hey, this is neat! And not too hard to set up (even for me, and I have maybe about 10 minutes of previous script-fiddling experience), though some of the directions in the original post are a bit vague.  Here's some expansion on them in case any other people without a lot of scripting experience might want to try this out but can't get it working:

 

D0: ID of the enemy.

 

This refers to what type of enemy (as in, you'd put 20 here for a Red Sword Octorok or 49 for a Red Darknut: Now With Actual Sword), not what enemy slot on the screen to use!  This script places an enemy independently of the screen's enemy listing.  Took me a few tries to get something other than a stationary, intangible old man with a sword to show up because of that. XD

 

D4: ID of the sprite to use.

 

This refers to the weapon sprites found under the Graphics --> Sprites --> Weapons and Misc menu.  It shows the ID numbers when you open up one of the sprites for editing.  So you would use 0 for a sword that looks like the Wooden Sword, 1 for a White Sword, and 14 for an oddball enemy who tries to club you with a hunk of meat.





Also tagged with one or more of these keywords: FFC

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users