Prowler Productions
  Dink Smallwood Forum
  help with spells/weapons

Post New Topic  
profile | register | faq

Author Topic:   help with spells/weapons
FF4LIFE posted 09-28- 10:02 PM CT (US)   Click Here to See the Profile for FF4LIFE   Click Here to Email FF4LIFE  
Is there a way to say void hit with only an item or only magic? Like:
void hit item(void)
or something like that?
Because I'm going to have certain spells and weapons do specail things to sprites when they hit them by under void hit checking what item they have. BUT, if you have the right item and hit them with magic it still triggers it. Is there a good way around this?

thanks

Sphinx posted 09-29- 11:45 PM CT (US)     Click Here to See the Profile for Sphinx  Click Here to Email Sphinx     
Yeah, use the same idea as the fireball and the burning tree... check out these scripts item-fb & s2-sec1 & dam-fire.
Unthinkable posted 10-01- 05:33 AM CT (US)     Click Here to See the Profile for Unthinkable  Click Here to Email Unthinkable     
Use a script under the hit section that checks the current weapon script and reacts acordingly

int compare_weapon( char name_of_item_script)

Example: compare_weapon("ITEM-B1"); would return 1 if the armed item's script was item-b1. Used in s3-gobg.c.

works like compare_magic()

Unthinkable posted 10-01- 05:40 AM CT (US)     Click Here to See the Profile for Unthinkable  Click Here to Email Unthinkable     
Download the DinkC help, from dink.telefragged.com

"Dink C Help Revision 2"

http://www.3ddownloads.com/showfile.php3?file_id=29662

It has a wealth of informaton on command usage.

Nexis posted 10-01- 04:30 PM CT (US)     Click Here to See the Profile for Nexis  Click Here to Email Nexis     
Sphinx's idea sounds good...now can anyone figure out where I neglected to do this check in Prophecy?
FF4LIFE posted 10-01- 07:11 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Yeah, i've thought of that, and thats why i asked the first question. You see, if I have a sword and when you attack a tree, under the tree's void hit it looks for the sword and finds it. Thats all good, right?
BUT, if you equip a magic, and hit the tree, it looks for the sword and finds it, but you didn't even hit it with the sword. So i'll have to attach a script to the certain weapons like dam-a, right? How whould I do that with a sword, or your fists?
FF4LIFE posted 10-10- 10:11 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
Uh, i like the idea of having it like the trees, but how do i check for a certain script within the tree script or whatever? I mean, I can make it run dam-fire or whatever, but in the script its hitting how do I check for it?
Sphinx posted 10-12- 02:42 AM CT (US)     Click Here to See the Profile for Sphinx  Click Here to Email Sphinx     
Okay, I think I need to get into specifics FF4LIFE, feel free to e-mail me at smorton1@home.com - I hope I can help.
someone2 posted 10-12- 03:39 AM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
If you want to find out if it was Dink who attached the tree with a sword, or a fireball, check &enemy_sprite.

ie:

--
void hit(void)
{
int &ebrain = sp_brain(&enemy_sprite);

if (&ebrain == 1)
{
//it is Dink
int &weap = compare_weapon("sword");
if (&weap == 1)
//dink hit the tree while armed with sword.c
}

if (&ebrain == 1)
{
//it is a missile
int &mag = compare_magic("fireball");
//etc etc..
}
}

---

I don't know what will happen if you try to hit the tree with a arrow, though.

someone2 posted 10-12- 03:41 AM CT (US)     Click Here to See the Profile for someone2  Click Here to Email someone2     
Uh.. that should be:

&ebrain = sp_brain(&enemy_sprite,-1);

FF4LIFE posted 10-12- 05:40 PM CT (US)     Click Here to See the Profile for FF4LIFE  Click Here to Email FF4LIFE     
The big problem is though, if you are equiped with the sword and hit it with a magic spell, you're holding the sword, so it thinks you used it. However, I know how to attach a dam-fire or whatver spell to an arrow, but how do I check under the enemy script for that particular script, like the trees burning.

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.