![]() |
Hat NPC -WHY?
This is my script.Plz tell meh whats wrong and maybe how to fix it.I think its the disabledefmovement OR triggeraction.
// NPC made by SeeD Captain /\/\ãxïmus Ðärkrïdër if (playertouchsme) { toweapons Hat NPC; i=0; } if (weaponfired) { set browsing; disabledefmovement; triggeraction playerx,playery,browsing,; } if (actionbrowsing) { i=0; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; } if (keydown(1)&&browsing) { i++; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; } if (keydown(3)&&browsing) { i--; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; } |
few things to make it better..
u should use this. variables and use this.browsing=1 instead of set browsing.. dont use flags unless ur like databasing something |
ok thanx,I know that won't make the script work,anymore help?
|
first off use keydown's in a timeout event, and dont use triggeraction
do like this if (weaponfired) { if (this.hatbrowsin==0) { this.hatbrowsin=1; timeout=.1; } else { this.hatbrowsin=0; } } |
so would you say this?
if (weaponfired) { if (this.hatbrowsin==0) { this.hatbrowsin=1; timeout=.1; } else { this.hatbrowsin=0; } } if (keydown(1)&&timeout)&&this.hatbrowsin==1) { i--; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; } if (keydown(3)&&timeout)&&this.hatbrowsin==1) { i++; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; } or would the keydown part go before the else {this.hatbrowsin;} :confused: |
it would be like this:
if (timeout&&this.hatbrowsin==1) { //keydown evens here timeout=.1; } |
hmmm....I am stupid.Is this it?
if (weaponfired) { if (this.hatbrowsin==0) { this.hatbrowsin=1; timeout=.1; } else { this.hatbrowsin=0; } if (timeout&&this.hatbrowsin==1) { if (keydown(1)&&timeout&&this.hatbrowsin==1) { i--; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; timeout =0.1; } if (keydown(3)&&timeout&&this.hatbrowsin==1) { i++; showimg 200,hat#v(i).png,playerx,playery-2.5; changeimgpart 200,96,0,55,55; timeout =0.1; } } } |
dont include the time and hatbrowsin thing in the keydowns
so it would be if (timeout&&this.hatbrowsin==1) { if (keydown(1)) { i--; etc., etc. |
Quote:
|
Quote:
|
personally i used a gani for mine
but hey, whatever you want |
thanx for the help but the script doesn't work at all,the keydowns don't register when I press them.
|
do this
NPC Code: |
thanx!
yesh this one works,I just have to make showimg smaller,or make it a gani,thanx for the help. :D
I probably will post more when I add more steps. |
lol,
yeah i know, i just didnt feel like, was running short on time sameasnow,betterhurry |
k
just a little problem,when I do hideimg when you use the S button (or keydown(5)) it doesn't hide the img,I am sure its right...
but you guys can probably tell me. the showimg index is 200 and my hideimg index is 200. Thats right,right? |
you'll have to post the script for me to check
|
nm I fixed it,I just added:
NPC Code: Pretty basic and I can't believe I couldn't think of that before |
Quote:
|
new options
Ok,I got the basic things done,now I need some help adding the following:
-When you select a hat to where and your already wearing it,it will go off. -And the BIG one,instead of having them all,could you help me make it so you only get first 5 for free and the rest you buy? this is the script so far: NPC Code:// NPC made by SeeD Captain /\/\ãxïmus Ðärkrïdër |
do something like this
[code] if (keydown(4)) { if (strequals(#P(0),)) { setplayerprop #P(0),whateverhat; setani hat-on,; sleep .35; break; } else { setani hat-off,; sleep .35; setplayerprop #P(0),; break; } } |
didnt test that
had to write it fast so i can finish a level, sorry if it doesn't work |
Quote:
|
Quote:
|
ya it doesn't work,I have no idea what was happening there,press down and something happened? I tried to fix it but I glitched it big time.
|
Quote:
[email protected] |
Quote:
|
how much does fish cost per pound??
|
Quote:
|
| All times are GMT +2. The time now is 07:17 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.