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-04-2005, 02:17 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Question

I was trying to make a staff block script where the block shows at your mouse. I was trying to figure out how to get the block to warp to the mousex and mousey only when it goes over another tile (this way you could lay the blocks evenly instead of having them clustered everwhere).

If you know what I'm talking about, then please explain.
Reply With Quote
  #2  
Old 08-17-2005, 01:20 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
It would be much easier to use a showimg and just clamp the x and y you display it at to 8 pixel increments (half tile) then when placed, actually use the putnpc2 to lay it.
NPC Code:

mx=mouse.x; // get mouse x coordinate
my=mouse.y; // get mouse y coordinate
mx-=mx%8; // clamp mx into 8 pixel increments by subtracting the remainder of a division by 8 (mx modulus 8)
my-=my%8; // clamp my into 8 pixel increments by subtracting the remainder of a division by 8 (my modulus 8)

// showimg goes here using mx and my for coordinates



but wait, triggers are bad! =( sorry lance.
__________________
Reply With Quote
  #3  
Old 08-17-2005, 03:06 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by calani
but wait, triggers are bad! =( sorry lance.
Don't be stupid. Triggeractions are an important part of scripting (so long as they are not insecurely used to circumvent basic protections against cheating).

If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.
Reply With Quote
  #4  
Old 08-17-2005, 03:57 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Lance
Don't be stupid. Triggeractions are an important part of scripting (so long as they are not insecurely used to circumvent basic protections against cheating).

If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.
Hah.
Reply With Quote
  #5  
Old 08-17-2005, 04:19 AM
Zero Hour Zero Hour is offline
Stiff Upper Lip
Zero Hour's Avatar
Join Date: Oct 2006
Location: Nova Scotia, Canada
Posts: 0
Zero Hour is on a distinguished road
Send a message via AIM to Zero Hour
Quote:
Originally Posted by Lance
If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.
Woah, harsh.
__________________
Reply With Quote
  #6  
Old 08-17-2005, 04:49 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Zero Hour
Woah, harsh.
But also ironic. Do as I say, not as I do.
Reply With Quote
  #7  
Old 08-22-2005, 08:40 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Quote:
Originally Posted by protagonist
But also ironic. Do as I say, not as I do.
hahahahahahahahaha
so true
__________________
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 07:54 PM.


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