Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   an 'offline' level online. (https://forums.graalonline.com/forums/showthread.php?t=134266501)

blackbeltben 05-23-2012 02:30 PM

an 'offline' level online.
 
How would I go about making a level that everyone can go to, but players can't see other players?

I believe n-pulse had some cut scene levels like that.

xXziroXx 05-23-2012 02:47 PM

You could either use copylevel(source, destination); to create multiple versions of the same level, or do some fancier system using hideplayer(time);, player.alpha and whatnot in ganis.

blackbeltben 05-23-2012 04:38 PM

Ziro, could you give me an example of the first one please... the (source, destination) one

CujoDaMan 05-23-2012 05:22 PM

You can't learn by copying and pasting but source would be foldername/levelname.nw and destination would be newfolder/levelname.nw

If i think right:

PHP Code:

copylevel("foldername/levelname.nw""newfolder/levelname.nw"); 

That may not be right, but I belive that is what it is.

fowlplay4 05-23-2012 06:05 PM

The best plan would be to do what Ziro said at the end and come up with a system that hides everyone except yourself and use client-side script for the cut-scene.

copylevel usage:

copylevel works off the levels folder as it's base so it can be a little confusing, in this example the template level is stored in:

levels/baselevel/housetemplate.nw

and it will be copied to:

levels/houselevels/house_account.nw

PHP Code:

function onCreated() {
  
copylevel("baselevel/housetemplate.nw""houselevels/house_account.nw");


Make sure your folder config includes:

level houselevels/*.nw

Otherwise you won't be able to access the level.

CujoDaMan 05-23-2012 06:53 PM

So with that you could make a level for every player by setting the new level name as "house_"@player.account@".nw" correct fp? I'm on my blackberry typing this .. Just want to make sure that would work for a better understanding

fowlplay4 05-23-2012 06:55 PM

Quote:

Originally Posted by CujoDaMan (Post 1695424)
So with that you could make a level for every player by setting the new level name as "house_"@player.account@".nw" correct fp? I'm on my blackberry typing this .. Just want to make sure that would work for a better understanding

Pretty much, be sure to do:

temp.lvl = "house_" @ escapefilename(player.account) @ ".nw";

Which will convert things like spaces and colons to their % reprensation form.

CujoDaMan 05-23-2012 06:58 PM

I thought so, thanks fp!

Rave_J 05-23-2012 07:17 PM

i want to say Tig post a script like this that he use it in Graal Kingdoms Quest. I'm just not sure if its in Code Gallery or GK fourms

fowlplay4 05-23-2012 07:23 PM

Quote:

Originally Posted by Rave_J (Post 1695428)
i want to say Tig post a script like this that he use it in Graal Kingdoms Quest. I'm just not sure if its in Code Gallery or GK fourms

cbk wrote the Instance Manager (Generator) that's used on GK:
http://forums.graalonline.com/forums...hp?t=134263240

Rave_J 05-24-2012 01:00 AM

Quote:

Originally Posted by fowlplay4 (Post 1695429)
cbk wrote the Instance Manager (Generator) that's used on GK:
http://forums.graalonline.com/forums...hp?t=134263240

oppps


All times are GMT +2. The time now is 10:12 PM.

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