Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-27-2014, 05:49 PM
samich samich is offline
Registered User
samich's Avatar
Join Date: Jan 2007
Posts: 59
samich will become famous soon enough
Send a message via MSN to samich
The reason they are NPC's is because they are copyLevel generated floors. It is an automated playerhouse-esque system, and I needed to dynamically set the level to go to next, as regular level links wouldn't work dynamically like that.

NPC Code:

function onCreated() {
setimg("vivitron_hotel-halfdoor.png");
// Get the next level up's floor number
this.floor = int(this.level.name.substring(12, -1).tokenize(".")[0]) + 1;
setshape(1, 32, 16);
dontblock();
drawunderplayer();
}

function onPlayerTouchsMe() {
if(!levelexists("hotel_floor_" @ this.floor @ ".nw")) return;
setlevel2("hotel_floor_" @ this.floor @ ".nw", player.x, 33.5);
}



Here is a video (disregard floors 1,2 and possibly 3, as they are made in a way that works, but is not the way I want the levels to look like): http://youtu.be/w6vKyZ8Pa_I

At around 18-20 seconds I demonstrate how moving slowly, the setlevel2 transition works just fine, but anytime before that, weird things happen, such as some images not loading (due to such immediate level switching, I'm assuming).
__________________
[Graal Related Business]
Reply With Quote
 


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:43 PM.


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