PDA

View Full Version : setshape2


VeX_RaT_Boy
01-19-2004, 10:23 PM
- setshape2 width,height,{tiletypes,...}
Lets the npc behave like a level, which means you can set
what size it has (in tiles) and how the tiles behave;
e.g. do setshape2 2,2,{3,3,3,3}; to make an npc that behaves
like a chair. Following tile types are supported:
0 nonblocking
2 hurting underground
3 chair
4 bed upper side
5 bed lower side
6 swamp
7 lava swamp
8 near water
9 near lava
11 water
12 lava
20 throw-through (fences)
21 jumping stone
22 blocking tile

My idea:
23 transparent nonblocking.
24 transparent blocking.

That part of the image will be transparent.

C&C?

Thought
01-19-2004, 10:31 PM
This is useless...? Could you clarify why you want this?

Use seteffectmode 2;

G_yoshi
01-19-2004, 10:46 PM
Originally posted by Thought
This is useless...? Could you clarify why you want this?

Use seteffectmode 2;

or:

seteffectmode 1;
setcoloreffect 0,0,0,0;


That works too :)

Or just use setshape on an NPC with no image. Its not that hard to do :) Its very useful for a multitude of things.

VeX_RaT_Boy
01-19-2004, 10:49 PM
Originally posted by Thought
Use seteffectmode 2;
Remove the colors? How would that work when you want to make 16x16 pixels of an image transparent?

EDIT:
Let's say I want to use this with block.png. What would i do if I wanted the top left corner transparent?

Thought
01-19-2004, 10:53 PM
Originally posted by VeX_RaT_Boy

Remove the colors? How would that work when you want to make 16x16 pixels of an image transparent?

EDIT:
Let's say I want to use this with block.png. What would i do if I wanted the top left corner transparent?
I thought seteffectmode 2 was sectionalized transparency?

Besides, just make the PNG transparent... that's not hard?

VeX_RaT_Boy
01-19-2004, 11:15 PM
Say that it is a 128x128 image. Instead of making 64 diffrent images, this option would be great!

G_yoshi
01-19-2004, 11:53 PM
Then why not just use tiles to do it? That is if you're not using terrain. What exactly are you trying to do? Have you considered asking for help with what you're doing? Someone might have a good idea or method that does what you're looking for.

VeX_RaT_Boy
01-20-2004, 12:10 AM
Originally posted by G_yoshi
Then why not just use tiles to do it? That is if you're not using terrain. What exactly are you trying to do? Have you considered asking for help with what you're doing? Someone might have a good idea or method that does what you're looking for.
Theres nothing specific I'm after. If there was, I'm 90% sure that I would've find a sulution myself.

Also, the tiles thing would be good, but what if the image was not of tiles?

I just thought this would be a good idea, and I still think that.

G_yoshi
01-20-2004, 12:19 AM
Originally posted by VeX_RaT_Boy

Theres nothing specific I'm after. If there was, I'm 90% sure that I would've find a sulution myself.

Also, the tiles thing would be good, but what if the image was not of tiles?

I just thought this would be a good idea, and I still think that.

addtiledef2 for the thing about it not being tiles :p

Seriously, this isn't something that is needed when there are better ways to do it. For example, just make one image for all the different combinations, put them in a gani and use params to control the appearance, and use an NPC for the script that knows what kind of tile field to setup based upon the given param.

Something that would be more useful, though as a special effect, are effects like water ripples or realtime shadow casting :) The shadow casting, however might be a tad more difficult since its all 2D sprites :x But there are ways around such barriers.

Hevaricubed
01-22-2004, 10:22 PM
I see the usefulness if you wanted to do this dynamically, e.g. hide a middle square if it the boat gets shot or something, but not if it was supposed to be like that all the time.

If you have a 128x128 image, and want to cut something out and have a transparency, why the hell would you need 64 different images?

G_yoshi
01-24-2004, 06:25 AM
It can also be done with a gani

Every tile you wanted to be able to hide, use a parameter, but I think the limit on that is 30 :x Or make a series of ganis using the image parts or whatever. Really, I don't see a need for such a thing anyway :p