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 04-24-2007, 03:22 AM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
scaling characters

does anyone know how I can scale a character as they move up or down the screen?? thanks.
Reply With Quote
  #2  
Old 04-24-2007, 03:47 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
a character as in a player or a letter?
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #3  
Old 04-24-2007, 04:09 AM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
the actual character, so when someone pushes the UP directional button to move up, the character is scaled down (to simulate that the character is farther away) and when the player pushes the DOWN directional button to move down the screen, the character is scaled up (to similate that the character is closer)
Reply With Quote
  #4  
Old 04-24-2007, 04:14 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Something says maybe you should learn to script first? I'm just going on assumation here, you may be able to script, you may not. I'm just making an assumption based on how you presented the question.

But to the point...

If you have some scripting experience, try searching the wiki or skyld's wiki as well for some information on zooming. As I believe there ARE some functions that allow you to do this.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #5  
Old 04-24-2007, 06:09 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Stan you can't really script either yet you have this whole attitude thing.

TGaniObject.zoom

Players and NPCs are TGaniObjects so they should have the zoom variable available on clientside. Just get some script to change this variable.
__________________
Reply With Quote
  #6  
Old 04-24-2007, 06:55 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
I wasn't trying to come off as having an attitude, if it sounded that way I didn't mean it. Because this person didn't ask for someone to script for him, he didn't post a script saying, "zomgfgd fix 4 me plz" he asked a logical question if anyone knew.

So I state maybe he should learn how to script first, wasn't attempting to claim superiority or arrogance here either, however, I then stated I was making an assumption and that I could or could not be wrong.

Then I suggested if he DID have some scripting experience to try and search the wiki for a solution as it often answers a lot of questions.

I can pretty much understand why you think I have an attitude most of the time, due to me freaking out when someone is posting something and just asks for answers or is posting in Gs1 and I don't mean to do that. I'm very impatient and I shouldn't do that.

So, CherryKao I hope you didn't take offense to that as I didn't mean any.


So yeah I've been a bit of an ******* lately, so pretty much sorry guys.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #7  
Old 04-24-2007, 08:02 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
There is a player.zoom variable available for use clientside. When using this, only the player will see the changes so you'll have to make a system to show correct zoom sizes for all players clientside.
Reply With Quote
  #8  
Old 04-24-2007, 08:11 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Twinny View Post
There is a player.zoom variable available for use clientside. When using this, only the player will see the changes so you'll have to make a system to show correct zoom sizes for all players clientside.
YEAH DO ALL THAT...
or just make a gani script that adjusts your zoom on a timeout, using an attr for zoom. that way everyone will see your zoom...
ps: player.attr[x] = "whatever.gani"; will attach a script to you
__________________

Last edited by Kristi; 04-24-2007 at 06:32 PM..
Reply With Quote
  #9  
Old 04-24-2007, 08:09 PM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
hey thanks Kristi. with that being my first post in the graal community, i didn't realize people were so rude. i didn't find the "npcprogramming.doc" in my graal folder complete or very helpful. i am a pretty good C++ programmer and a Java programmer, but new to Graal scripting. i'll look into the Wiki site and i'll definately look into the gani script.
Reply With Quote
  #10  
Old 04-24-2007, 09:15 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Cherrykao View Post
with that being my first post in the graal community, i didn't realize people were so rude.
Did I not say it was not my intention to come off as rude?
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #11  
Old 04-24-2007, 09:43 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by killerogue View Post
Did I not say it was not my intention to come off as rude?
The road to hell is paved with good intentions, yes?
__________________
Reply With Quote
  #12  
Old 04-24-2007, 09:57 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Cherrykao View Post
hey thanks Kristi. with that being my first post in the graal community, i didn't realize people were so rude. i didn't find the "npcprogramming.doc" in my graal folder complete or very helpful. i am a pretty good C++ programmer and a Java programmer, but new to Graal scripting. i'll look into the Wiki site and i'll definately look into the gani script.
There are plenty of scripting resources available both on http://wiki.graal.net/Creation/Dev/GScript and http://skyld.vip.graal.net/ to aid new scripters.
__________________
Skyld
Reply With Quote
  #13  
Old 04-24-2007, 10:19 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Inverness View Post
The road to hell is paved with good intentions, yes?
Ha ha, well in any case. I didn't mean to be an ass-hat. And I've apologized both publicly and personally.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #14  
Old 04-25-2007, 03:38 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Cherrykao View Post
i didn't realize people were so rude
lol ... just lol

You'll want to make a gani script, and use params or attrs so it shows the zoom for everybody. To make a gani script, edit the gani file in a text editor, and at the bottom (or so) add

PHP Code:
SCRIPT
  
// Code goes here
SCRIPTEND 
and if you want to use params, you need to use that in an if (created) and then call something. Otherwise, it will reset the params. For example,

PHP Code:
SCRIPT
  
if ( created )
  {
    
doStartparams );
  }
  function 
doStartNULL )
  {
    echo( 
params );
  }
SCRIPTEND 
__________________
Reply With Quote
  #15  
Old 04-26-2007, 04:51 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by cbkbud View Post
lol ... just lol

You'll want to make a gani script, and use params or attrs so it shows the zoom for everybody. To make a gani script, edit the gani file in a text editor, and at the bottom (or so) add

PHP Code:
SCRIPT
  
// Code goes here
SCRIPTEND 
and if you want to use params, you need to use that in an if (created) and then call something. Otherwise, it will reset the params. For example,

PHP Code:
SCRIPT
  
if ( created )
  {
    
doStartparams );
  }
  function 
doStartNULL )
  {
    echo( 
params );
  }
SCRIPTEND 
oh my god use function onCreated(), not if created.

and thats not true. params are passed to the onPlayerEnters function
so if you do like setani("whatever",param,param,param);
the function onPlayerEnters(somename,somename2,etc) in the gani will recieve those parameters.
__________________
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 04:46 PM.


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