Add more abilities in wc3 ft ... but how
Moderator: Forum Moderator
Add more abilities in wc3 ft ... but how
Hi folks,
i`m currently playing with the idea of enabling shadowmeld for the elfs again, the code itself aint the problem, wrote an amxx plugin tht renders the user invisible every time he holds the knife and isnt moving.
the only problem im having is to include it into wc3:ft.
If someone could tell me which of the includes i need, or how i tell the plugin to use the wc3.amxx and all its functions tht would be gr8.
atm i have a specific file ( shadowmeld.inl ) and a line in the warcraft3.sma (include shadowmeld.inl ) but stil get too many errors in the compiling process... cant deal with RACE_ELF for examle...
seems like something is missing in the includes for i cannot access the wc3 specific race and level functions...
please gimme a hint !
i`m currently playing with the idea of enabling shadowmeld for the elfs again, the code itself aint the problem, wrote an amxx plugin tht renders the user invisible every time he holds the knife and isnt moving.
the only problem im having is to include it into wc3:ft.
If someone could tell me which of the includes i need, or how i tell the plugin to use the wc3.amxx and all its functions tht would be gr8.
atm i have a specific file ( shadowmeld.inl ) and a line in the warcraft3.sma (include shadowmeld.inl ) but stil get too many errors in the compiling process... cant deal with RACE_ELF for examle...
seems like something is missing in the includes for i cannot access the wc3 specific race and level functions...
please gimme a hint !
right, back on topic... included the script into "skills.inl" as a new public function, called in "events.inl"
still some problems : while in shadowmeld mode, the screen in fading to a slight blue, and of course u remain invisible.... however, as soon as someone flashbang or hits you, the effects are overwritten by flashbang and the glowing of the attack.
Now, I could go through the entire code and add a if to every glow that occurs on the victim if hit, but I was hoping you might have a better idea @ Geesu ?
Can I call this funkction anywhere so that it is constantly checked, over and over again ( yes, I know, a lot of CPU usages goes.... but atm that`s not my concern... ) and overrrides the glow of a hit ?
still some problems : while in shadowmeld mode, the screen in fading to a slight blue, and of course u remain invisible.... however, as soon as someone flashbang or hits you, the effects are overwritten by flashbang and the glowing of the attack.
Now, I could go through the entire code and add a if to every glow that occurs on the victim if hit, but I was hoping you might have a better idea @ Geesu ?
Can I call this funkction anywhere so that it is constantly checked, over and over again ( yes, I know, a lot of CPU usages goes.... but atm that`s not my concern... ) and overrrides the glow of a hit ?
so far :
included in skills.inl :
in events.inl
onCurWeapon : initialise on change to knife the function
on_ResetHud to set things straight agan after a new round :
remove_task(id)
p_data[id][P_TIME]=0 ( dunno if that one here actually changes something or not....
and of course in constants.inl defining some of the variables
now, I know that the code could be far better... out of lazyness and testing I used "CreateScreenFade" just to see how it works...
had a problem with the tasks : whenever i wanted to assign a proper name to the task, other than "id" it would not pass the id on to the function, even tho it was declared ( to the best of my knowledge ) correctly.
What I havent done yet, checking the movement properly, X Y Z ... but fot the moment the check, the way it is, will do ....
Still, the problem with orcs and elf`s landing a shot on u stil exists... for 0.01 seconds u become visible again...
...and stil need to add a c_var for the sm length... but as u can see, all of it stil is very very... well ? just playing with it and seeing how it works ? took me 100 times more time to work myself through your code than actually putting this together
THX for havin a peak at it ! really appreciate this !
and please dont mind my bad coding... more used to php and hings like that
included in skills.inl :
Code: Select all
// ****************************************
// Elf`s Shadowmeld
// ****************************************
public Skill_Shadowmeld(id)
{
if ( p_data[id][P_RACE]==RACE_ELF && p_data[id][P_LEVEL]>=6) {
new clipamount = 0, ammoamount = 0, weaponnum = 0
weaponnum = get_user_weapon(id,clipamount,ammoamount)
#if MOD == 0
if (weaponnum==CSW_KNIFE){
#endif
#if MOD == 1
if (weaponnum==DODW_AMERKNIFE || weaponnum==DODW_GERKNIFE || weaponnum==DODW_SPADE){
#endif
if(p_data[id][P_TIME]>=400) {
if(task_exists(id))
remove_task(id)
}
if(p_data[id][P_TIME]<=400) {
new origin[3]
get_user_origin(id,origin)
p_data[id][P_LOCATIONX]=origin[0]
Create_ScreenFade(id, (1<<15), (1<<10), (1<<12), 0, 0, 255, 150)
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,0)
set_task(1.0,"shadow_move",id,"",0,"b")
set_task(0.01,"shadowmeld",id,"",0,"b")
}
}
else{
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,255)
Create_ScreenFade(id, (1<<15), (1<<10), (1<<12), 255, 255, 255, 0)
remove_task(id)
}
}
}
public shadow_move(id)
{
new origin[3]
get_user_origin(id,origin)
p_data[id][P_LOCATIONX]=origin[0]
p_data[id][P_LOCATIONY]=origin[2]
p_data[id][P_LOCATIONZ]=origin[2]
}
public shadowmeld(id)
{
new oldOrigin[3];
new minus,plus
new time_remaining=400
get_user_origin(id,oldOrigin)
minus = oldOrigin[0]
plus = oldOrigin[0]
minus-=2
plus+=2
time_remaining=400-p_data[id][P_TIME]
p_data[id][P_TIME]+=1
if(p_data[id][P_TIME]<=400) {
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,0)
set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 0.08)
show_hudmessage(id, "SHADOWMELD ACTIVE^remaining : %i",time_remaining)
Create_ScreenFade(id, (1<<15), (1<<10), (1<<12), 0, 0, 255, 90)
if(p_data[id][P_LOCATIONX]<minus || p_data[id][P_LOCATIONX]>plus){
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,255)
Create_ScreenFade(id, (1<<15), (1<<10), (1<<12), 255, 255, 255, 0)
remove_task(id)
}
if(p_data[id][P_TIME]>=400) {
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,255)
Create_ScreenFade(id, (1<<15), (1<<10), (1<<12), 255, 255, 255, 0)
remove_task(id)
set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 1.0)
show_hudmessage(id, "No more shadowmeld this round...")
}
}
}
onCurWeapon : initialise on change to knife the function
Code: Select all
//Check Shadowmeld
Skill_Shadowmeld(id)
cstrike.inl on_endRound :if ( endround )
{
// have "fake" ultimate delay
iUltimateDelay = iCvar[FT_ULTIMATE_DELAY];
new parm[1];
parm[0] = 0;
_Ultimate_Delay(parm);
remove_task(id) <-
p_data[id][P_TIME]=0 <-
}
remove_task(id)
p_data[id][P_TIME]=0 ( dunno if that one here actually changes something or not....
and of course in constants.inl defining some of the variables
now, I know that the code could be far better... out of lazyness and testing I used "CreateScreenFade" just to see how it works...
had a problem with the tasks : whenever i wanted to assign a proper name to the task, other than "id" it would not pass the id on to the function, even tho it was declared ( to the best of my knowledge ) correctly.
What I havent done yet, checking the movement properly, X Y Z ... but fot the moment the check, the way it is, will do ....
Still, the problem with orcs and elf`s landing a shot on u stil exists... for 0.01 seconds u become visible again...
...and stil need to add a c_var for the sm length... but as u can see, all of it stil is very very... well ? just playing with it and seeing how it works ? took me 100 times more time to work myself through your code than actually putting this together

THX for havin a peak at it ! really appreciate this !
and please dont mind my bad coding... more used to php and hings like that
