| 09-17-2003, 12:23 AM | #1 |
I hope this doesn't sound too confusing. Basically, I can draw all the pretty pictures in the world with offsets and have them fire on specific targets, but I can't seem to make them rotate and fire in front of the caster regardless of his current angle. I can make a straight line vertically, that will follow from caster to target with polars, but a horizontal line is whole different story. I'm trying to do this: ____xx ___xx xx __xx 0 xx <----------- 0=Caster X=FX But, it just doesn't seem to work with offsets...or rather, I am having trouble making it work. If caster is facing any direction but north it looks fubar. I have tried angle between caster and target, distance between.. Xof, Yof...meh.. I just cant seem to lock it so it fires directly in front of caster regardless of angle. Can anyone give me an example of how to set this up, or give me any suggestions on how to rotate the entire pattern based on current angle of caster? |
| 09-17-2003, 12:53 AM | #2 |
Well, I think you've got the right idea using polar offsets... the unit's right (not the right on the screen, but the right as seen from the unit's point of view) should be the Facing Angle of the unit minus 90 degrees... I think. Similarly the unit's left should be its Facing Angle plus 90 degrees. One thing that could be screwing things up is the camera angle. Are you rotating the camera around? If so you might want to add (or subtract?) the Rotation of Current Camera to the mix... I'm honestly not sure whether that will work or not. Sorry this is so convoluted... does it help at all? |
| 09-17-2003, 01:29 AM | #3 |
Well, I did, in some of my earlier experiments play around with trying to make it fire off in the direction of current cam, but it still fired at it's exact offsets regardless. I'm looking at spellmakers firewall spell now, and it's chuck full of math, I have a sinking feeling im gonna need a calculator :( Just seems like there should be an easier way.. |
| 09-17-2003, 01:49 AM | #4 |
Special Effect - Create a special effect at ((Position of (Triggering unit)) offset by 256.00 towards (Facing of (Triggering unit)) degrees) using specialeffect.mdl That should creat the special effect in front of the unit no matter where he turns. |
| 09-17-2003, 02:19 AM | #5 | |
Quote:
If you are suggesting I do - Special Effect-Create special effect at((position of (triggering unit)) offset by 256 towards (facing of (triggering unit)) degrees) offset by (XX),(XX) I tried this and it still skews and does not properly adjust to the angle of the caster. |
| 09-17-2003, 05:50 AM | #6 |
If you're trying to create special effects in a pattern (eg fire wall), I think what you're doing wrong is you're trying to offset everything from the caster. What you should do is first create a reference point using 'Create a special effect at (Location) offset by (Distance) towards (Angle) degrees'. You should save the point to a local variable or create an invisible unit there or something like that--you just need to remember that point. Then you can create all the other effects using offsets relative to that reference point. So, in the case of Spellmaker's fire wall, you would create one flame in front of the caster, and then create flames offset to the left and right side of it. |
| 09-17-2003, 08:49 AM | #7 |
I'll try this in the morning. Thanks Desolate. |
| 09-17-2003, 07:47 PM | #8 |
Still trying. meh..It's all fine if caster is facing north or south..but east or west is funked. I will figure it out.. eventually. |
| 09-17-2003, 08:00 PM | #9 |
You can use (Facing of Caster - 90.00) for left and + 90.00 for right... (Polar offset) |
| 09-17-2003, 08:47 PM | #10 |
Not quite what I need. However I finally figured it out. Desolates method worked with some tweaking. The part throwing me off was the correct angles. This seems to be working, I may have to tweak it some more, but it appears to be tracking correctly. Special Effect - Create a special effect at (Wavestart offset by 128.00 towards (Angle from (Position of (Ordered unit)) to (Wavestart offset by (64.00, 64.00))) degrees) using objects\spawnmodels\naga\nagadeath\nagadeath.mdx Can't believe I was stuck on it so long heh, thanks for the comments and help everyone. |
