Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2011, 08:16 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
put

"levels/houses/%s"

in your level folders array at the top.
That didnt work
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 08-24-2011, 08:30 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Astram View Post
That didnt work
and (npcserver) and yourself have rw levels/houses/* in your folder rights?

Quote:
Originally Posted by 0PiX0 View Post
There is a bug when you change the npc's image to be nothing.

Please fix double-click detection. Sometimes if you click GraalControl then click a npc too soon, the script editor opens.
I need instructions to reproduce the error with images.

I don't think onMouseDown reports double clicks properly because it registers the mouse down three times (which makes it very annoying to check if the double-click happened in the same area as the single click) in situations where I only clicked twice within 0.3 of a second.

Two clicks in two different spots that are more than 16 pixels shouldn't register as a double-click either but it does.

PHP Code:
//#CLIENTSIDE
function onMouseDown(click) {
  echo(
click SPC timevar2);

__________________
Quote:
Reply With Quote
  #3  
Old 08-24-2011, 08:50 PM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
I need instructions to reproduce the error with images.
  1. Open the script editor on any npc.
  2. Set this (or similar) as the script:
    PHP Code:
    //#CLIENTSIDE
    function onCreated() {
      
    showimg(300"block.png"this.xthis.y);

  3. Change the npc's default image from "*.png" to ""
  4. Apply, then f9 save
It results with this line in the level file:
"NPC (2 spaces) 34 45"
when it should be "NPC 0 34 45", or something like that.

---
PHP Code:
//#CLIENTSIDE 
function GraalControl.onMouseDown(temp.click) { 
  echo(
click SPC timevar2); 

One echo per click for me.
Reply With Quote
  #4  
Old 08-24-2011, 09:05 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by 0PiX0 View Post
Image bug.

---
PHP Code:
//#CLIENTSIDE 
function GraalControl.onMouseDown(temp.click) { 
  echo(
click SPC timevar2); 

One echo per click for me.
Fixed the bug in my latest version.

GraalControl.onMouseDown isn't the same as onMouseDown. I was hoping to just use it's double-click functionality but it looks like I'll have to write my own.

Fixed the annoying double-click thing too. See attached for the latest version.

Edit: Fixed a bug that resulted in new NPCs being set to the placeholder image. Also changed editor's text profile to match external RC (bigger text, pink strings, and blue highlighting) a bit more.

Edit by Skyld: Latest version available at http://forums.graalonline.com/forums...5&postcount=39.
__________________
Quote:

Last edited by Skyld; 01-23-2012 at 08:29 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:20 AM.


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