![]() |
why doesnt this work?
if (keypressed) {
setarray rockthrow,3; rockthrow.[0]=3.14/2; rockthrow.[1]=3.14; rockthrow.[2]=3.14*3/2; rockthrow.[3]=0; if (this.on==1&&strequals(#p(1),y)) {shoot playerx,playery,playerz,rockthrow.[playerdir],1,0,shoot,wbrock.gif;} } i want my little man to throw a rock the direction that hes facing but i dont think i did it right |
I see one mistake right off the bat, the array lenght does not indicate the last index, but the acual lenght of the array. 4 slots, arraylen = 4... so
setarray rockthrow,4; also, there is no period before the [], its just rockthrow[#] There are easier ways to do this, but i'll let you figure that out. |
Itll be a good script
|
arrayname = {index0,index1,index2,index3};
|
Re: Re: why doesnt this work?
Quote:
|
Thank you guys =D yet another addition to my Wonderful server
|
| All times are GMT +2. The time now is 07:27 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.