The Dink Network

Scripting help please?

September 15th 2007, 08:55 PM
dragon.gif
drath
Peasant He/Him United States
Humans are crunchy and filled with Katchup. 
In the D-mod I'm makeing I have a mage that teaches you a spell,
the thing is he is realy mean. So I what it so if you attack him he will cast acid rain on you to kill ya. Please show me how to script it.
September 15th 2007, 09:09 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
It would be complicated to cast it as normal (projectile), but you could easily create the rain sequence on Dink and make it damage him.
September 15th 2007, 09:11 PM
dragon.gif
drath
Peasant He/Him United States
Humans are crunchy and filled with Katchup. 
ok then could you help me with that?
September 15th 2007, 09:23 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Have you looked through tutorials and the DinkC reference? You'd be surprised at how much you can learn from those. Anywhoo.. For this we will first need to get Dink's coordinates stored in variables (&dink_x, &dink_y) then we will create the acid rain using a create_sprite() command. You may need to tweak the coordinates by adding or subtracting to the variables.

//freeze dink first so theres no escape
freeze(1);

//getting dink's coordinates
int &dink_x = sp_x(1, -1);
int &dink_y = sp_y(1, -1);

//now we will create the sprite and give its damage
int &rain = create_sprite(&dink_x, &dink_y, 6, 94, 1);
sp_seq(&rain,94);
sp_touch_damage(&rain, 5);
September 15th 2007, 10:33 PM
dragon.gif
drath
Peasant He/Him United States
Humans are crunchy and filled with Katchup. 
thx for the help it worked