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 08-17-2001, 02:46 PM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
Unhappy Boomerang Script

if (playertouchsme) {
toweapons Boomerang;
set gotboomerang;
destroy;
}
if (weaponfired && this.flycounter<=0) {
hideimg 1;
hidesword 0.3;
this.distance = 13;
this.steplen = 1.5;

timeout = 0.05;
this.flycounter = 0;
this.oldx = playerx;
this.oldy = playery;
}
if (timeout) {
this.flycounter++;
if (this.flycounter<6) {
if (playerdir==0 || playerdir==2) playersprite = 13;
else playersprite = 6;
if (playerdir==0) showimg 1,wboom4.gif,playerx-0.7,playery+1.4;
if (playerdir==1) showimg 1,wboom3.gif,playerx+1.9,playery+1.5;
if (playerdir==2) showimg 1,wboom2.gif,playerx+2.3,playery+0.7;
if (playerdir==3) showimg 1,wboom2.gif,playerx-0.2,playery+1.5;
if (this.flycounter==2) freezeplayer 0.2;
timeout = 0.05;
} else if (this.flycounter==6) {
playersprite = 0;
this.mx = 0;
this.my = 0;
if (playerx>this.oldx) this.mx+=this.steplen;
if (playerx<this.oldx) this.mx-=this.steplen;
if (playery>this.oldy) this.my+=this.steplen;
if (playery<this.oldy) this.my-=this.steplen;
if (this.mx!=0 && this.my!=0) {
this.mx*=0.714;
this.my*=0.714;
}
if (this.mx==0 && this.my==0) {
if (playerdir==0) this.my-=this.steplen;
if (playerdir==1) this.mx-=this.steplen;
if (playerdir==2) this.my+=this.steplen;
if (playerdir==3) this.mx+=this.steplen;
}
this.flyx = playerx+0.5;
this.flyy = playery+1;
if (playerdir==0) this.flyx--;
if (playerdir==2) this.flyx++;
timeout = 0.05;
} else if (this.flycounter<6+this.distance) {
fac = cos(3.14/2*(this.flycounter-6)/this.distance);
this.flyx += this.mx*fac;
this.flyy += this.my*fac;
showimg 1,wboom.gif,this.flyx,this.flyy;
if (onwall(this.flyx+0.5,this.flyy+0.5)) {
putleaps 4,this.flyx,this.flyy;
this.flycounter = 6+this.distance;
} else
this.testhurt = 1;
timeout = 0.05;
} else {
distx = playerx+0.5-this.flyx;
disty = playery+1-this.flyy;
abs = (distx^2+disty^2)^0.5;
if (abs>=2) {
fac = arctan((this.flycounter-6-this.distance)/this.distance);
this.flyx += distx/abs*this.steplen*fac;
this.flyy += disty/abs*this.steplen*fac;
showimg 1,wboom.gif,this.flyx,this.flyy;
this.testhurt = 1;
timeout = 0.05;
} else {
hideimg 1;
this.flycounter = 0;
}
}
}
if (playerenters) {
hideimg 1;
this.flycounter = 0;
timeout = 0;
show;
}
if (this.testhurt == 1) {
for (i=0; i<compuscount; i++) {
if (abs(this.flyx-compus[i].x)<=1 &&
abs(this.flyy-(compus[i].y-0.5))<=1.5 &&
compus[i].mode!=3)
hitcompu i,0,this.flyx+0.5,this.flyy+0.5;
}
for (i=1; i<playerscount; i++) {
if (abs((this.flyx+0.7)-(players[i].x+1.5))<=1 &&
abs((this.flyy+0.5)-(players[i].y+1.5))<=1.5)
hitplayer i,0,this.flyx+0.5,this.flyy+0.5;
}
this.testhurt = 0;
}




Why won't this werk???????? It says this:Error: Expected format abs(val) PLZ HELP
---------L8---------
----Brian----------
Reply With Quote
  #2  
Old 08-17-2001, 03:45 PM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
Angry

a friend made it up and i know he did b/c i know him in real life and i saw him doing it all day yesterday and he just suddnly had troubles with it!!!!!!!!
Reply With Quote
  #3  
Old 08-18-2001, 05:07 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
change abs variables to something else other then abs cuz abs is abs() a command (absolute value) which is used for finding distance of a number to 0 o.o (good for transfering negatives to positives)
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #4  
Old 08-19-2001, 01:26 AM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
that is identical to the original boomerang script.

bleh it is so old it needs fixin.

And lot's of it.
__________________

Rogue World
Reply With Quote
  #5  
Old 08-19-2001, 01:38 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Kaimetsu
Fuzie: I don't believe for a second that he made up that script, and used most of the same variable names as in the original boomerang script.

Liquidice: That's pretty much what I just said, but abs isn't just "good for transfering negatives to positives," that's ALL it does. Well, it would be if you swapped "transfering" for any word that made sense here.
they should have absolute value but for pos>neg.
so i dont gotta do
this.x=this.x-(this.x*2);
;D
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #6  
Old 08-19-2001, 04:10 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by LiquidIce00


they should have absolute value but for pos>neg.
so i dont gotta do
this.x=this.x-(this.x*2);
;D
why not just
this.x=this.x*-1;
?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #7  
Old 08-19-2001, 04:54 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Quote:
Originally posted by LiquidIce00


they should have absolute value but for pos>neg.
so i dont gotta do
this.x=this.x-(this.x*2);
;D
this.x = abs(this.x)*-1;

that'll always return the negative value.
Reply With Quote
  #8  
Old 08-19-2001, 05:03 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by kyle0654

this.x = abs(this.x)*-1;

that'll always return the negative value.
that too o.o
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #9  
Old 08-19-2001, 05:51 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
yay leet boomerang script
Reply With Quote
  #10  
Old 08-19-2001, 01:45 PM
Floppyman Floppyman is offline
Banned
Join Date: Aug 2001
Posts: 45
Floppyman is on a distinguished road
Angry Fazie

That is my boomerang scprit and i would be happy , if you or your friend didnt take credit for making it , Thank you
Reply With Quote
  #11  
Old 08-19-2001, 11:24 PM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Re: Fazie

Quote:
Originally posted by Floppyman
That is my boomerang scprit and i would be happy , if you or your friend didnt take credit for making it , Thank you
Stefan made it
At least, I think it was him

Last edited by kyle0654; 08-20-2001 at 12:55 AM..
Reply With Quote
  #12  
Old 08-20-2001, 12:52 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
bahhh.,....i'll edit it a bit and just do
//Made by Stefan
//Edited my Brian

hows that?????????

--------Brian----------
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
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 01:27 PM.


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