![]() |
Help with actionprojectile
(BEFORE YOU READ - I searched the forums already and none explained how to make it work right or none had the problem ive been having) I need help with actionprojectile. I put it in the control-npc and it never works when the projectile hits a player or npc. I did it clientside too and put it in a system npc, but it NEVER works. Here is the part of my script (NOTE: The shoot and setshootparams work perfectly because I tested it with actionprojectile2 and it works)
NPC Code: NPC Code: Help if you can. ~Value (Manager of Altair) Edit: Loriel added [code]-tags. |
Re: Help with actionprojectile
NPC Code: should be NPC Code: helps? or you can just go NPC Code: that'll do .5 damage. Hope it helps |
Re: Re: Help with actionprojectile
Quote:
He is doing it in the Control NPC, that then #p(0) is the landing x, and the #p(1) is the landing y. You should have it in some kind of system weapon and in clientside...THEN it would be #p(0). |
Re: Re: Re: Help with actionprojectile
Quote:
|
Re: Re: Re: Re: Help with actionprojectile
Quote:
#p(0) = x of projectile #p(1) = y of projectile #p(2) = first param of projectile and so on and so fourth. It's like how if (pm) takes #p(1) as the first param (or rcchat, think it's PM) where it's not the first param as #p(0). Just trust us on this one m8 ;) If it's online on a server let me know and I'll come check it out in about 2-3 hours when I get home and before I go to work tonight. ---Shifter |
Re: Re: Re: Re: Re: Help with actionprojectile
Quote:
|
ALSO
The script I posted is clientside, not serverside. Serverside would of had the with (players[i]) stuff. Also, I already put //#CLIENTSIDE in the npc but I forgot to post it here. But it's pretty obvious it's not serverside.
BTW, my server is online and the name is Altair (not visible). ~Value (Manager of Altair) |
Hmmm I will make a little docu about custom hitpoint system and how to handle projectile impacts in a few hours, need it for Zone and Classic anyway so I can also post it here.
A quick note: on serverside you need to do 'hitobjects', the other commands (hitplayer etc.) don't work |
There posted, in a new sticky thread :)
|
Quote:
http://forums.graal2001.com/forums/s...threadid=50809 |
i'm also having a action w/e problum, only mines diffrent, it works on players (havn't tried online but not gonna et a server anyways) but it's not working on NPCs, please help.
Code: // NPC made by Medabee5111 if (created) { toweapons Gun Test; hide; } if (weaponfired) { freezeplayer 0.2; players[].sprite = 33; if(playerdir==0){ setshootparams #w,500; shoot playerx,playery-1.5,,3.14/2,,0,adv_snowball,; } if(playerdir==2){ setshootparams #w,500; shoot playerx+0.01,playery,,3.14*3/2,,0,adv_snowball,; } if(playerdir==1){ setshootparams #w,500; shoot playerx-0.1,playery-0.3,,3.14,,0,adv_snowball,; } if(playerdir==3){ setshootparams #w,500; shoot playerx+0.1,playery-0.3,,0,,0,adv_snowball,; } } if(actionprojectile){ if(strequals(#p(0),Gun Test)){ lay heart; } } //i made it do lay heart; couse i knew that it would make somthing happen if action projectile worked on the NPC |
[list=1][*]Use code tags[*]Read Stefans document, it has a lot shorter way of doing "shoot"[/list=1]
|
| All times are GMT +2. The time now is 01:41 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.