Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-14-2002, 09:17 AM
Joe27hunter Joe27hunter is offline
Banned
Join Date: Nov 2001
Posts: 35
Joe27hunter is on a distinguished road
Post Will you help me with Wings...

Will you fix these wings i made. They work and all but there like only for staff because when you use them if you attack you can move while your doing it. There like staff boots that cant go on walls lol. Also will you make it be able if i fire it it goes off lol.
Attached Files
File Type: txt wings.txt (1.2 KB, 221 views)
Reply With Quote
  #2  
Old 01-14-2002, 09:58 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Let me point out a few things to change:
if (created) {x+=.5;}
Don't do x+=.5, put the exact x place you want it like x=30.5
if (playertouchsme) {
toweapons Wings;
hidelocal;
this.wings=0;
}
if (weaponfired&&this.wings==0) {
this.wings==1;
}
while (this.wings==1) {
this.oldx=playerx;
this.oldy=playery;

if (keydown(0)&&wings) {playery-=2;playerdir=0;}
else if (keydown(1)&&wings) {playerx-=2;playerdir=1;}
else if (keydown(2)&&wings) {playery+=2;playerdir=2;}
else if (keydown(3)&&wings) {playerx+=2;playerdir=3;}

if (onwall(playerx,playery+1)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+2,playery+2)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+,playery+3)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+1,playery+3)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+2,playery+3)) {playerx=this.oldx;playery=this.oldy;}
if (strequals(#c,wings off)&&this.wings==1) {
this.wings==0;
}
sleep 0.05;
}
if (weaponfired&&this.wings==1)
{this.wings==0;}
That should work fine, if it doesn't, try using a string
Reply With Quote
  #3  
Old 01-14-2002, 10:31 AM
Faheria_LAT1 Faheria_LAT1 is offline
Seraphim Warrior
Faheria_LAT1's Avatar
Join Date: Oct 2001
Location: QUÉBEC!!!!!!1
Posts: 2,040
Faheria_LAT1 is on a distinguished road
Send a message via ICQ to Faheria_LAT1 Send a message via AIM to Faheria_LAT1
WTS? Why make wings npc with showimg wts???!?!? If its for a Free PW I understand but I prefer ganiz =P mwahahaha fear:
Attached Images
 
__________________


"I like movies where the guy shoots stuff, and then it blows up, and then this other guy shoots him, and then the first guy drives through a Coke sign, and it blows up, and the car flips over in slow motion, and then the guy gets out and pops his arm back in place, and then they fight 'cause they're out of bullets, and the guy says something like "This is Walmart, boy...and you just got price-checked!" - Broken Saints

"There is no greater sorrow than to recall in misery when we were happy" - Dante

"If you know yourself but not the enemy, for every victory gained you will also suffer a defeat" - Sun Tzu, The Art Of War

"Kingdoms ...rising without word. Collapsing without warning." - Broken Saints

Account now used by Silver and Mmmmkay
yoshee15 account has run out :[[[
Reply With Quote
  #4  
Old 01-19-2002, 09:46 PM
Joe27hunter Joe27hunter is offline
Banned
Join Date: Nov 2001
Posts: 35
Joe27hunter is on a distinguished road
It doesnt work can you fix this...

It doesn't work still
Attached Files
File Type: txt wings.txt (1.3 KB, 170 views)
Reply With Quote
  #5  
Old 01-19-2002, 10:23 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
OMG please make a better onwall-check X_x

example:
NPC Code:

for(i=0;i < 4; i++){
if(keydown(i)){
for(m=0;m < 2;m+=.05){
if(!onwall(playerx+1.5+vecx(i),playery+2+vecy(i)){
playerx+=vecx(i)*.05;
playery+=vecy(i)*.05;
}
}
}
}



not very good but it's a complete movement-script...
__________________
No Webhost at the moment
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.