An lille bit of coding :D
4 posters
Page 1 of 1
An lille bit of coding :D
if some of u fell like learning how to code or is having trouble with one of your codes, then you can post it here and ill try to help (so far i think its only me and Pedak that have done some codings but i might be wrong), atleast heres an small skill code of an beam so that ull get something to figgure on,
public Roar_Of_Time(id, skill, prop)
{
new level = SkillLevel(id, skill);
new Float:f_origin[3], Float:f_aimvec[3];
new victim = PokeSkillTarget(id);
get_user_origin(id, origin[id]);
get_user_origin(id, aim[id], 2);
IVecFVec(origin[id], f_origin);
IVecFVec(aim[id], f_aimvec);
skillLinedamage(id, f_origin, f_aimvec, level/3, level, skill, _, STATUS_POISON, -1);
origin[id][2] -= 5;
MakeLine(0,origin[id],aim[id],SPRITE_INDEX[SPR_ARBOK],1,1,1,10+level,0,200,50,80,185,0);
poke_sound(id,CHAN_VOICE, SND_HIT);
screenflash(victim, 128, 50, 128, 300, FLASH_TIME)
if( end_rep_use(id, skill, 2.0) )
return SKILL_USED;
return SKILL_READY;
}
public Roar_Of_Time(id, skill, prop)
{
new level = SkillLevel(id, skill);
new Float:f_origin[3], Float:f_aimvec[3];
new victim = PokeSkillTarget(id);
get_user_origin(id, origin[id]);
get_user_origin(id, aim[id], 2);
IVecFVec(origin[id], f_origin);
IVecFVec(aim[id], f_aimvec);
skillLinedamage(id, f_origin, f_aimvec, level/3, level, skill, _, STATUS_POISON, -1);
origin[id][2] -= 5;
MakeLine(0,origin[id],aim[id],SPRITE_INDEX[SPR_ARBOK],1,1,1,10+level,0,200,50,80,185,0);
poke_sound(id,CHAN_VOICE, SND_HIT);
screenflash(victim, 128, 50, 128, 300, FLASH_TIME)
if( end_rep_use(id, skill, 2.0) )
return SKILL_USED;
return SKILL_READY;
}
Re: An lille bit of coding :D
Alright m8, gona start studying that, and learning how to make my own xD
Heatmanofurioso- Posts : 134
Join date : 2011-02-10
Age : 30
Location : Portugal
Re: An lille bit of coding :D
Okay then ima break down that skill for ya:
first thing that starts skill:
first thing that starts skill:
- Code:
//these signs make the compiler not read this line. This starts the skill
public Roar_Of_Time(id, skill, prop)
{
//gets users level
new level = SkillLevel(id, skill);
new Float:f_origin[3], Float:f_aimvec[3];
//those that beams his = victim
new victim = PokeSkillTarget(id);
//get were user is and were he is aiming
get_user_origin(id, origin[id]);
get_user_origin(id, aim[id], 2);
IVecFVec(origin[id], f_origin);
IVecFVec(aim[id], f_aimvec);
//this is the acctual beam damage. the damage is level/3 so in lvl 99 one beam will do 33 dmg and //apply poison
skillLinedamage(id, f_origin, f_aimvec, level/3, level, skill, _, STATUS_POISON, -1);
//move the origin an bit up so that beam dsnt start at ur feat
origin[id][2] -= 5;
//make the acctual beam line with spr_arbok as sprite. Starts at user and stops were he aims
MakeLine(0,origin[id],aim[id],SPRITE_INDEX[SPR_ARBOK],1,1,1,10+level,0,200,50,80,185,0);
//wudnt be cool without an sound
poke_sound(id,CHAN_VOICE, SND_HIT);
//make the victims screen flash for more cool effect
screenflash(victim, 128, 50, 128, 300, FLASH_TIME)
//make this repeat 20 times (so 20 beams)
if( end_rep_use(id, skill, 2.0) )
//return that the skill has been used and is ready to get cooldown
return SKILL_USED;
//just so that skill will restart later
return SKILL_READY;
//the } ends the script({ starts } ends)
}
Re: An lille bit of coding :D
Could you also post a skill whit a ball, like the skill "ice ball" ?
<--Nobody-->- Posts : 27
Join date : 2011-01-15
Re: An lille bit of coding :D
if you can code good and that stuff cant you like make an amazing 1 that can like dmg 200000???
lolz owned- Posts : 8
Join date : 2011-04-18
Re: An lille bit of coding :D
anny skill can damage that.. you just need to set the damage, but we aint doing that
Heatmanofurioso- Posts : 134
Join date : 2011-02-10
Age : 30
Location : Portugal
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|