Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graphic Design (https://forums.graalonline.com/forums/forumdisplay.php?f=9)
-   -   Shield trouble.. (https://forums.graalonline.com/forums/showthread.php?t=68040)

DutchGuy 08-12-2006 12:08 AM

Shield trouble..
 
1 Attachment(s)
Hey guys so i tried something new making a japanese fan shield...

for a member of my guild..
i tried making it and i had all views done... but on the server it displays something really different..
the frontview i can only see the half of it:S. the sideviews cant bee seen and the back of it shows the other half of the front...

i attached the sprite into an attachment here.. so can anyone give me feedback so that my shield will be displayed correctly in all views.

I made it from scratch didnt use any editing on shields though.

please if anyone feel necessary can he or she edit it right ??
sorry if this is in the wrong forum..didnt know where to put it.

DutchGuy 08-12-2006 12:36 PM

hey is there in some way anything possible to test this before getting it uploaded?? like being able to put it in an offline mode or something so that i know it will be displayed right?

Elk 08-12-2006 02:27 PM

no way.
Use a bigger shield file, that's what I do.

Don't doublepost

Sum41Freeeeek 08-14-2006 12:10 AM

Quote:

Originally Posted by DutchGuy
hey is there in some way anything possible to test this before getting it uploaded?? like being able to put it in an offline mode or something so that i know it will be displayed right?

Try to space them out so it's in the correct form.
Make sure it's transparent, and to use it in offline mode put a copy of the shield
(just to make sure) in the main folder, levels folder, and shields folder, then use
it in offline mode o.o I think...

Skrobo2 08-14-2006 12:27 AM

1 Attachment(s)
Quote:

Originally Posted by DutchGuy
hey is there in some way anything possible to test this before getting it uploaded?? like being able to put it in an offline mode or something so that i know it will be displayed right?

Indeed there is. Simply put the image in a folder and save a new level in the same folder. (You'll need the level editor.) In the level you made, add a blank NPC. (See attached image.) Then double click the blank NPC and add this script.

NPC Code:
//#CLIENTSIDE
if (playerchats) {
if (startswith(setbody,#c)) {
setplayerprop #8,#e(8,-1,#c);
}else if (startswith(sethead,#c)) {
setplayerprop #3,#e(8,-1,#c);
}else if (startswith(setshield,#c)) {
setplayerprop #2,#e(10,-1,#c);
}else if (startswith(setsword,#c)) {
setplayerprop #1,#e(9,-1,#c);
}else if (startswith(sethat,#c)) {
setplayerprop #P1,#e(7,-1,#c);
}else if (startswith(skin,#c)) {
setplayerprop #C0,#e(5,-1,#c);
}else if (startswith(coat,#c)) {
setplayerprop #C1,#e(5,-1,#c);
}else if (startswith(sleeves,#c)) {
setplayerprop #C2,#e(8,-1,#c);
}else if (startswith(shoes,#c)) {
setplayerprop #C3,#e(6,-1,#c);
}else if (startswith(belt,#c)) {
setplayerprop #C4,#e(5,-1,#c);
}else if (startswith(all,#c)) {
setplayerprop #C0,#e(4,-1,#c);
setplayerprop #C1,#e(4,-1,#c);
setplayerprop #C2,#e(4,-1,#c);
setplayerprop #C3,#e(4,-1,#c);
setplayerprop #C4,#e(4,-1,#c);
}
}



This script will allow you to set the following:
hat: 'sethat'
body: 'setbody'
sheild: 'setshield'
head: 'sethead'
skin color: 'skin'
coat color: 'coat'
sleeves color: 'sleeves'
shoes color: 'shoes'
belt color: 'belt'
color of all body parts: 'all'

Just say what's inside the quotations followed by the file name/color.
Ex: sethat hat13.png

If you have any questions or such, just forum pm me.

zephirot 08-28-2006 05:05 PM

Sorry for reviving, but that script is golden, someone should sticky it

Draenin 08-28-2006 05:09 PM

You can kinda get essentially the same script by simply adding a premade player NPC. :whatever:

zephirot 08-28-2006 05:11 PM

Yeah, thats true, but for some reason, the shilds I make are not showing, can't test them :(

Magadal 08-28-2006 05:39 PM

Put the shield in the same folder as the level, or use the "Test" button in a level, press F1, disable filenamecache and restart the editor. Tadaa oO

Draenin 08-28-2006 05:47 PM

NPC Code:
//#CLIENTSIDE

function onPlayerchats(){
if (startswith(setbody,#c)) {
setplayerprop #8,#e(8,-1,#c);
}
if (startswith(sethead,#c)) {
setplayerprop #3,#e(8,-1,#c);
}
if (startswith(setshield,#c))
setplayerprop #2,#e(10,-1,#c);
}
if (startswith(setsword,#c)) {
setplayerprop #1,#e(9,-1,#c);
}
if (startswith(sethat,#c)) {
setplayerprop #P1,#e(7,-1,#c);
}
if (startswith(skin,#c)) {
setplayerprop #C0,#e(5,-1,#c);
}
if (startswith(coat,#c)) {
setplayerprop #C1,#e(5,-1,#c);
}
if (startswith(sleeves,#c)) {
setplayerprop #C2,#e(8,-1,#c);
}
if (startswith(shoes,#c)) {
setplayerprop #C3,#e(6,-1,#c);
}
if (startswith(belt,#c)) {
setplayerprop #C4,#e(5,-1,#c);
}
if (startswith(all,#c)) {
setplayerprop #C0,#e(4,-1,#c);
setplayerprop #C1,#e(4,-1,#c);
setplayerprop #C2,#e(4,-1,#c);
setplayerprop #C3,#e(4,-1,#c);
setplayerprop #C4,#e(4,-1,#c);
}
}



There. Should be a more useful formatting style, and it eliminates the unnecessary else cases. I'm not a fan of the #commands, but I still have to learn how those need to be written out in GS2.

zephirot 08-28-2006 06:17 PM

This is GS2 right? GS2 doesn't work offline :(.

Draenin 08-28-2006 07:43 PM

I tried formatting it that way in case anyone wants to use it.

Skrobo2 08-28-2006 08:08 PM

Quote:

Originally Posted by Draenin
NPC Code:
//#CLIENTSIDE

function onPlayerchats(){
if (startswith(setbody,#c)) {
setplayerprop #8,#e(8,-1,#c);
}
if (startswith(sethead,#c)) {
setplayerprop #3,#e(8,-1,#c);
}
if (startswith(setshield,#c))
setplayerprop #2,#e(10,-1,#c);
}
if (startswith(setsword,#c)) {
setplayerprop #1,#e(9,-1,#c);
}
if (startswith(sethat,#c)) {
setplayerprop #P1,#e(7,-1,#c);
}
if (startswith(skin,#c)) {
setplayerprop #C0,#e(5,-1,#c);
}
if (startswith(coat,#c)) {
setplayerprop #C1,#e(5,-1,#c);
}
if (startswith(sleeves,#c)) {
setplayerprop #C2,#e(8,-1,#c);
}
if (startswith(shoes,#c)) {
setplayerprop #C3,#e(6,-1,#c);
}
if (startswith(belt,#c)) {
setplayerprop #C4,#e(5,-1,#c);
}
if (startswith(all,#c)) {
setplayerprop #C0,#e(4,-1,#c);
setplayerprop #C1,#e(4,-1,#c);
setplayerprop #C2,#e(4,-1,#c);
setplayerprop #C3,#e(4,-1,#c);
setplayerprop #C4,#e(4,-1,#c);
}
}



There. Should be a more useful formatting style, and it eliminates the unnecessary else cases. I'm not a fan of the #commands, but I still have to learn how those need to be written out in GS2.

GS2 does not work in the offline editor. Which is why I wrote it in GS1 to begin with.

NPC Code:

//#CLIENTSIDE

function onPlayerchats(){
if (player.chat.starts("setbody")) {
player.bodyimg = player.chat.substring(8,-1);
}else if (player.chat.starts("sethead")) {
player.headimg = player.chat.substring(8,-1);
}else if (player.chat.starts("setshield"))
player.shieldimg = player.chat.substring(10,-1);
}else if (player.chat.starts("setsword")) {
player.swordimg = player.chat.substring(9,-1);
}else if (player.chat.starts("sethat")) {
player.attr[1] = player.chat.substring(7,-1);
}else if (player.chat.starts("skin")) {
player.colors[0] = player.chat.substring(5,-1);
}else if (player.chat.starts("coat")) {
player.colors[1] = player.chat.substring(5,-1);
}else if (player.chat.starts("sleeves")) {
player.colors[2] = player.chat.substring(8,-1);
}else if (player.chat.starts("shoes")) {
player.colors[3] = player.chat.substring(6,-1);
}else if (player.chat.starts("belt")) {
player.colors[4] = player.chat.substring(5,-1);
}else if (player.chat.starts("all")) {
for (i=0;i<5;i++) {
player.colors[i] = player.chat.substring(4,-1);
}
}
}



This is the way it would look, though. Mixing GS1 and GS2 is bad, Draenin.

Draenin 08-29-2006 12:14 AM

Ah, so that's how you would rewrite those #commands. That's fairly useful information. Thanks. (Also, the else statements do not necessarily need to be combined with the if commands if you aren't going to put anything in them.)

Skrobo2 08-29-2006 05:20 AM

It still work fine. I just prefer to do it with else-if statements. Also, I didn't know how to set attributes, colors, etc. in GS2 either, before I typed that up. I looked it up on the wiki.

Draenin 08-29-2006 07:24 AM

Yeah. I'm sort of learning from another scripter at the moment, who is surprisingly doing a fairly decent job.

Skrobo2 08-29-2006 08:27 AM

:P It's not all that hard. That link to the wiki can be really useful in converting your scripts from GS1 to GS2.

Draenin 08-29-2006 02:38 PM

Yeah. For me, the issue is not learning to script, as I did that long long ago. I just never really took the time to learn gscript commands, whether it be GS1 or GS2.

Skrobo2 08-29-2006 02:49 PM

Indeed. commands.rtf and the wiki should be all you need.

zephirot 08-29-2006 05:40 PM

Z.z still not working


All times are GMT +2. The time now is 07:17 AM.

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