Graal Forums

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

theHAWKER 04-05-2007 02:08 AM

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 ? :D

killerogue 04-05-2007 03:55 AM

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. >.>

Rapidwolve 04-05-2007 04:04 AM

Quote:

Originally Posted by killerogue (Post 1296958)
Dude, I suggest you start learning GS2 immediately, it's worlds easier than GS1. >.>

He could be making this offline o_o

DustyPorViva 04-05-2007 04:37 AM

His //#CLIENTSIDE kind of kills that theory.

Angel_Light 04-05-2007 05:13 AM

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 (Post 1296958)
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

theHAWKER 04-05-2007 06:14 AM

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!

DustyPorViva 04-05-2007 06:34 AM

Well you don't exactly tell us what's not working with your script.

theHAWKER 04-05-2007 06:36 AM

Quote:

Originally Posted by DustyPorViva (Post 1297001)
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)

Kristi 04-05-2007 07:50 AM

Quote:

Originally Posted by theHAWKER (Post 1296899)
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 ? :D

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.

Angel_Light 04-05-2007 01:03 PM

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.

killerogue 04-05-2007 08:59 PM

Quote:

Originally Posted by theHAWKER (Post 1296998)
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 (Post 1297002)
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.

Bl0nkt 04-05-2007 10:23 PM

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.

Angel_Light 04-05-2007 11:09 PM

Quote:

Originally Posted by Bl0nkt (Post 1297216)
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, :D 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

Chandler 04-06-2007 07:40 AM

Quote:

Originally Posted by Bl0nkt (Post 1297216)
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

theHAWKER 04-06-2007 07:41 AM

Quote:

Originally Posted by Angel_Light (Post 1297054)
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 :D

and sory if i sound rude, but when i check the forums usualy its lat at night and im half dead/drunk felling xD

Angel_Light 04-06-2007 06:48 PM

haha no problem, glad to help :P


All times are GMT +2. The time now is 06:21 AM.

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