Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
My Dragon Breath needs improvement
|
Author |
Message |
Crusader
Master
Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6
Erehwon New Hera
|
My Dragon Breath needs improvement
How should it work:
the dragon fire on an enemy, but the fire reach the ground some meters BEFORE the enemy, doing a line of fire that goes along a straight line that hits also the enemy and goes thorught it.
so, if X is the fire breathed and Y is the enemy is something like this:
=O*breath* -> xxyxxxx
or u can better see here: http://www.youtube.com/watch?v=yGpJZAMPKV0
That's what i did:
Code:
[SPELL 600]
DEFNAME=s_dragon_Breath
NAME=Soffio del Drago
CAST_TIME=1.5
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM | SPELLFLAG_FX_TARG | SPELLFLAG_RESIST | 010000
MANAUSE=1
RESOURCES=
SKILLREQ=MAGERY 0.0
INTERRUPT=100.0,40.0
ON=@SELECT
IF (<ARGN3> > 2)
ENDIF
RETURN 0
ON=@START
SRC.EMOTE Soffia!
RETURN 0
ON=@EFFECT
serv.log sorg: <src.p> | dest: <p>
local.newcalc1= <eval <src.p.x> - <p.x>>
local.newcalc2= <eval <src.p.y> - <p.y>>
IF <dlocal.newcalc1> <= 0
local.newcalc1= <eval (<p.x> - <src.p.x>)/3>
var.newsourcex= <eval <src.p.x> + <local.newcalc1>>
var.newdestx= <eval <p.x> + <local.newcalc1>>
ELSE
local.newcalc1 = <dlocal.newcalc1>/3
var.newsourcex= <eval <src.p.x> - <local.newcalc1>>
var.newdestx= <eval <p.x> - <local.newcalc1>>
ENDIF
IF <dlocal.newcalc2> <= 0
local.newcalc2= <eval (<p.y> - <src.p.y>)/3>
var.newsourcey= <eval <src.p.y> + <local.newcalc2>>
var.newdesty= <eval <p.y> + <local.newcalc2>>
ELSE
local.newcalc2 = <dlocal.newcalc2>/3
var.newsourcey= <eval <src.p.y> - <local.newcalc2>>
var.newdesty= <eval <p.y> - <local.newcalc2>>
ENDIF
// src chi soffia
// [] il target
SFX snd_spell_explosion
var.speed=3
local.diff = 2
for x 0 1
for y 0 3
var.speed +=2
firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
endfor
endfor
var.newsourcex
var.newdestx
var.newsourcey
var.newdesty
var.speed
RETURN 0
[FUNCTION firebreath]
//local.t_x=<argn1>
//local.t_y=<argn2>
//local.t_z=<argn3>
sector.allclients sendpacket 0c0 00 D00 D00 W036b0 W<eval <var.newsourcex>> W<eval <var.newsourcey>> B<eval <argn3>> W<eval <var.newdestx>> W<eval <var.newdesty>> B<eval <p.z>+2> B<var.speed> B016 00 00 00 B01 D026 D03
This kind of 'work' but sometimes the firebreath doesn't "really" hit the enemy (depending on the corner) and it goes like down the z (even if i put an higher z) resulting with a 'cut' of the firebreath animation. Plus i'd like to do a longer fire line; plus, i'm not really certain on how to do apply damage. Thinking about "forchar 3" in 3 middle point during the fire line. but ...yeah dunno.
Suggestion & fix are appreciated
|
|
10-31-2013 08:15 PM |
|
|
Messages In This Thread |
My Dragon Breath needs improvement - Crusader - 10-31-2013 08:15 PM
|
User(s) browsing this thread: 2 Guest(s)