PDA

View Full Version : Making Lweapons that pass through enemies...



beefster09
03-22-2009, 04:58 PM
Since we can make items spawn weapons that pass through enemies, like the golden arrow, is it possible to do this via script? It doesn't seem possible to spawn weapons that don't disappear after running into keese, also killing them.

ShadowTiger
03-22-2009, 07:16 PM
I wonder how that Ball and Chain script worked then. I've been trying to figure it out, but ..

beefster09
03-22-2009, 07:34 PM
Problem is I don't want this LWeapon to do any damage- not even kill keese. I haven't really investigated this thoroughly.

Gleeok
03-22-2009, 07:46 PM
hmm... I have an *idea* if you want to try it out.

What if you either change Links weapon to an eweapon while it is in close proximity to enemies, or this one's probably better: Change the lweapon to a bomb type as simlar to the above.


What do you think?

lucas92
03-22-2009, 08:42 PM
lweapon->HitHeight = 0;lweapon->HitWidth = 0; should work.

beefster09
03-22-2009, 11:17 PM
Wouldn't that just make the collision happen at the up-left corner of the lweapon?

ShadowTiger
03-22-2009, 11:36 PM
So I take it making them negative is out of the question entirely.

pkmnfrk
03-23-2009, 12:13 AM
Wouldn't that just make the collision happen at the up-left corner of the lweapon?

If the internal collision looks like the following, then no:


if(weapon->X + weapon->HitWidth > Link->X && weapon->X < Link->X + 16 && weapon->Y + weapon->HitHeight > Link->Y && weapon->Y < Link->Y + 16) { ... }

Joe123
03-23-2009, 11:15 AM
I'm pretty sure if it has hitheight and width of 0 it can still hit an enemy, but don't quote me on that.

Why'd you need one that goes through an enemy though?
Is it just a decoration?

_L_
03-24-2009, 03:20 AM
The real solution:

weapon->HitXOffset = 2000; // Or some high number.