Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   help here (https://forums.graalonline.com/forums/showthread.php?t=134264151)

Rave_J 08-09-2011 11:56 AM

help here
 
ok i know u can do it i just dnt know how too really
i was wondering if theres away u can have a script to make Random links Tiles

i thought about doing it like
have a img with a class
if function PlayerTouchesme()
warp setlevel whatever
then another
system where its setting to a var to randomize it
where the img change location on the level
but idk how to randomize it can someone please explain this little bit better to me thanks

Fulg0reSama 08-09-2011 12:36 PM

Rave, because I know everyone else will say this (with more of a harsh tone though); Could you write this more clearly?

Twinny 08-10-2011 12:28 AM

At a guess,

PHP Code:

function onCreated() {
  
this.links = {
    {
"level1.nw"3545},
    {
"level2.nw"4535},
    {
"levellol.nw"1337}
  };
}

function 
onPlayerTouchsMe() {
  
temp.choice this.links[int(random(0this.links.size()))];
  
player.setlevel2(temp.choice[0], temp.choice[1], temp.choice[2]);


Would warp you to a random level when you touch it

Rave_J 08-12-2011 07:45 PM

i got it pfa help me out
i was trying to make the img random threw the whole level
but but pretty much i figure out how to randomize the imgs
so they move everywhere i want them too


All times are GMT +2. The time now is 02:23 AM.

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