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-09-2011, 11:56 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
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
__________________
Graal Developer
Reply With Quote
  #2  
Old 08-09-2011, 12:36 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Rave, because I know everyone else will say this (with more of a harsh tone though); Could you write this more clearly?
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #3  
Old 08-10-2011, 12:28 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
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
Reply With Quote
  #4  
Old 08-12-2011, 07:45 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
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
__________________
Graal Developer
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:38 AM.


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