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-05-2007, 02:08 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Exclamation imgpart help :(

im trying to make a single bit of a waterfall, but my script wont work
PHP Code:
if (created) {
  
setimg waterani.mng;
  
dontblock;
}
//#CLIENTSIDE
if (playerenters) {
  
setcoloreffect 0,0,1,0.99;
  
setimgpart waterani.mng,100,100,32,100;
  
drawaslight;

some one help me out ?
__________________
**FLIP OUT**
Reply With Quote
  #2  
Old 04-05-2007, 03: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
PHP Code:
function onCreated()
{

  
setimg("waterani.mng");
  
setshape(1,32,32); //Will you ever learn to use this?
  
dontblock();

}

//#CLIENTSIDE
function onPlayerEnters()
{

  
setcoloreffect(0,0,1,0.99);
  
setimgpart("waterani.mng",100,100,32,100);
  
drawaslight();



Dude, I suggest you start learning GS2 immediately, it's worlds easier than GS1. >.>
__________________


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
  #3  
Old 04-05-2007, 04:04 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by killerogue View Post
Dude, I suggest you start learning GS2 immediately, it's worlds easier than GS1. >.>
He could be making this offline o_o
Reply With Quote
  #4  
Old 04-05-2007, 04:37 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
His //#CLIENTSIDE kind of kills that theory.
Reply With Quote
  #5  
Old 04-05-2007, 05:13 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
or better yet
PHP Code:
GS2:
setimgpart("waterani.mng",16*6,16*6,16*2,16*6);
GS1:
setimgpart waterani.mng,16*6,16*6,16*2,16*6
much easier to handle with graal blocks that are 16 px by 16 px so 16*6 would be 6 blocks or 96 pixels. :]

Quote:
Originally Posted by killerogue View Post
PHP Code:
  setshape(1,32,32); //Will you ever learn to use this? 
that's only if he wants it to block 32 px by 32 px it should be 32 100 in his case and really only needed for images that have transparent parts. :o
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 04-05-2007, 06:14 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Ah god u guys are no help, can u like explain ur scripts or somthing cause they dont work x.x
and chicken boy why would i want a block? I WANT PART OF THE WATERFALL!!!!
MY GOD!
__________________
**FLIP OUT**
Reply With Quote
  #7  
Old 04-05-2007, 06:34 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well you don't exactly tell us what's not working with your script.
Reply With Quote
  #8  
Old 04-05-2007, 06:36 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
Well you don't exactly tell us what's not working with your script.
xD, sry but i dont think u should be giving people useless scripts... (scripts that dont work)
__________________
**FLIP OUT**
Reply With Quote
  #9  
Old 04-05-2007, 07:50 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 theHAWKER View Post
im trying to make a single bit of a waterfall, but my script wont work
PHP Code:
if (created) {
  
setimg waterani.mng;
  
dontblock;
}
//#CLIENTSIDE
if (playerenters) {
  
setcoloreffect 0,0,1,0.99;
  
setimgpart waterani.mng,100,100,32,100;
  
drawaslight;

some one help me out ?
im not sure what waterani.mng is like, but i am going to go out on a limb and say that the x can start 100 pixels over and go 32 more.

Either way, you can do the setimgpart clientside only and not worry about the serverside, since there doesnt need to be a shape serverside with no block.
__________________
Reply With Quote
  #10  
Old 04-05-2007, 01:03 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
When I say block I meant not able to walk on. Do you wat us to define setimgpart?

GS2: setimgpart( "FileName", x, y, width, height);
GS1: setimgpart FileName, x, y, width, height;

Key:
Filename : Image your wanting to use.
x : where should the pixel start displaying horizontally, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the left will not show.
y: where should the pixel start displaying vertically, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the top will not show.
width : How wide should the image be displayed from the x.
height : How tall should the image be displayed from the y.

Example:
The default image is 32 px by 32 px
GS2:
PHP Code:
 //#CLIENTSIDE
function onCreated() {
  
setimgpart"block.png"16161616);

GS1:
PHP Code:
 //#CLIENTSIDE
if (created) {
  
setimgpart block.png16161616;

This will only show the lower right part of the block.
._ ._
|_|_|
|_|_| <- this lower right box will only be shown.
__________________
Deep into the Darkness peering...
Reply With Quote
  #11  
Old 04-05-2007, 08:59 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 theHAWKER View Post
Ah god u guys are no help, can u like explain ur scripts or somthing cause they dont work x.x
and chicken boy why would i want a block? I WANT PART OF THE WATERFALL!!!!
MY GOD!
"Block" was used as an example. Why is it that each time we come we must give you a working script? We all pretty much know what it is you are asking for.

Why not ask questions and from the responses try to figure it out yourself?

I can understand you wanting to learn to script. But if you're going to be rude, and tell us things like:

Quote:
Originally Posted by theHAWKER View Post
xD, sry but i dont think u should be giving people useless scripts... (scripts that dont work)
Then go learn by your damn self. We're not here to give you working scripts. We're here to help you if necessary. There's no need to be that way when we're simply making an attempt to help you out so that you can continue to become better at developing.
__________________


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
  #12  
Old 04-05-2007, 10:23 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
I taught myself by snooping through levels as a novice LAT about 3-4 years ago on Trinity. I asked a few questions on RC, experimented with what I read in the code, and got as far as I am now. A lot of scripters and NATs dislike my coding because it's sloppy in their eyes. That's because I'm a self-taught scripter and had no knowledge of programming outside of Graal. My scripts, however, are very functional and secure. For example, I made on Era

~gang doors
~gang metal detectors
~event: outbreak
~et control
~business stocking/buying system
~business scrolling speakers
~elevators
~keypads

and a lot more.

Moral of the story is to experiment with codes you see, ask about the functionality of a segment you don't quite understand, and put it to different use in your own code.
Reply With Quote
  #13  
Old 04-05-2007, 11:09 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Bl0nkt View Post
I taught myself by snooping through levels as a novice LAT about 3-4 years ago on Trinity. I asked a few questions on RC, experimented with what I read in the code, and got as far as I am now. A lot of scripters and NATs dislike my coding because it's sloppy in their eyes. That's because I'm a self-taught scripter and had no knowledge of programming outside of Graal. My scripts, however, are very functional and secure. For example, I made on Era

~gang doors
~gang metal detectors
~event: outbreak
~et control
~business stocking/buying system
~business scrolling speakers
~elevators
~keypads

and a lot more.

Moral of the story is to experiment with codes you see, ask about the functionality of a segment you don't quite understand, and put it to different use in your own code.
Same here XP, Mainly looked at Inverns script and messed with some code and vars which really helped alot, thanks Invern, Then Napo kinda tutored me :P Once I left Aeon, and went to Appolox I had Napo as a reference and he helped alot, and Invern kept telling, "Go to the Wiki and learn it damn it!" lol which got me motivated, Anyways back on topic, like Blonkt said, try to be rude to people who try to help, you get more scripts with honey than vinegar XD
__________________
Deep into the Darkness peering...
Reply With Quote
  #14  
Old 04-06-2007, 07:40 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Bl0nkt View Post
I taught myself by snooping through levels as a novice LAT about 3-4 years ago on Trinity. I asked a few questions on RC, experimented with what I read in the code, and got as far as I am now. A lot of scripters and NATs dislike my coding because it's sloppy in their eyes. That's because I'm a self-taught scripter and had no knowledge of programming outside of Graal. My scripts, however, are very functional and secure. For example, I made on Era

~gang doors
~gang metal detectors
~event: outbreak
~et control
~business stocking/buying system
~business scrolling speakers
~elevators
~keypads

and a lot more.

Moral of the story is to experiment with codes you see, ask about the functionality of a segment you don't quite understand, and put it to different use in your own code.
I wouldn't go that far... o-o
Reply With Quote
  #15  
Old 04-06-2007, 07:41 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Wink

Quote:
Originally Posted by Angel_Light View Post
When I say block I meant not able to walk on. Do you wat us to define setimgpart?

GS2: setimgpart( "FileName", x, y, width, height);
GS1: setimgpart FileName, x, y, width, height;

Key:
Filename : Image your wanting to use.
x : where should the pixel start displaying horizontally, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the left will not show.
y: where should the pixel start displaying vertically, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the top will not show.
width : How wide should the image be displayed from the x.
height : How tall should the image be displayed from the y.

Example:
The default image is 32 px by 32 px
GS2:
PHP Code:
 //#CLIENTSIDE
function onCreated() {
  
setimgpart"block.png"16161616);

GS1:
PHP Code:
 //#CLIENTSIDE
if (created) {
  
setimgpart block.png16161616;

This will only show the lower right part of the block.
._ ._
|_|_|
|_|_| <- this lower right box will only be shown.
This rely helped me xD thank you alot

and sory if i sound rude, but when i check the forums usualy its lat at night and im half dead/drunk felling xD
__________________
**FLIP OUT**
Reply With Quote
  #16  
Old 04-06-2007, 06:48 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
haha no problem, glad to help :P
__________________
Deep into the Darkness peering...
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 01:35 AM.


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