YolkfolkThe Dizzy Fansite 0 logged in0 playing
Community discussion

I need help... please

Started by Trikeboy on 20 September 2008 • 6,902 views

11 posts
#54294
Hi,
Brand new here. I have created images to be used for tiles including sprites but I cannot get the Alpha channels to work. I am following the how to on the dizzyage tutorial page but they won't work. I am using Photoshop 7.0 and know that the page is designed for 6.0 but they shouldn't be too different. I think the problem lies with the saving. When I choose Targa as the format, it greys out the option for "Alpha Channels" and "Layers" in the Save Options section. It only lets me choose "As a Copy". Can anybody help me?

p.s. Hi to everybody here.
👍 0
#62121
i personally don't use PS7, but here are a few links that may help you:

http://www.ozoneasylum.com/28366

http://forums.digitalmedianet.com/cgi-bin/readwholethread.fcgi?forum=adobe_photoshop&post=[phone redacted].htm&toppostid=4290

http://www.worldoftrainz.com/Pages/TutorialsTRS/PhotoshopArtFileTutTRS.htm

i also found while looking on google that only version 7.0.1 onwards supports saving as targa, so if you're just on v7.0.0 you may want to download the patch update from adobes website. a couple of the links above have a link to the patch

hope that helps.
👍 0
#62122
I had a problem when I first started that took me ages to figure out. I use Paintshop Pro and the problem was I was allowing my images to save as a compressed TGA file which was not compatible with the editor. By unchecking the save as compressed option everything worked. I've never used Photoshop so I can't say if it is the same problem, but you never know.
👍 0
#62123
Thanks for that. Used the update and it is working perfectly. I thought I was going mad.
👍 0
#62188

Ok, new problem. I want to use an object so Dizzy can hold it as an item but dropped in the right place will let him stand on it. I have created the item (id = 2) and the place where he drops it (id = 3). id 2 properties are material 7, draw = 1 and is dynamic. id 3 properties have material 7, draw = 0 and is dynamic. I am using the following code:

func ActionObject_3()
{
  // Drop Heavy Chest

  idx = ObjFind(3);
  if( idx <= -1 ) return;

  if(ObjGet(idx,O_ID)==2)
  {
    ObjSet(idx,O_DISABLE,1);
    BrushSet(BrushFind(3),B_DRAW,3);
    GameCommand(CMD_REFRESH);
  }
  else
  {
    // Item not used so it is dropped
    DropObject( idx );
  }
}

This drops the item but doesn't allow me to stand on the item. I am using the standard scripts that come with dizzyage. Can anybody help?

👍 0
#62189
Inventory items are dynamic objects and I think only static objects use the block flag.

Instead set the material to air, then when you drop the chest in the correct place set the collider flag to hard collision. You will then be stood on the chest.

To see what I mean set any inventory items collider to hard collision in the games map and see what happens when dizzy goes to pick it up and drop it.
👍 0
#62200

yeah you could do it that way. the only problem with that is that you can't then stand in front of it to pick it back up again!

alex did a brief 'how to' here: https://www.yolkfolk.com/dizzyage/articles/howto_player.html#trampoline suggesting a couple of ways.

I did it a different way in MSD with the Standing stone. you can move a 'static' object within the same room, however you can't move a static object outside of the original room. If you try to then it probably won't be static anymore.

it's rather complex tbh,, but here is how it was done in MSD. basically i had three tiles that made up the item. the stone, which is a dynamic object (obj 2051) that is visible, but cannot be picked up. a static object (brush 2052) that isn't visible, but mirrors the position of the dynamic object exactly, and a dynamic object (obj 1016) that isn't visible, but is actionable, which is positioned around the outside of the actual item, so that dizzy collides with it whereever he is stood next to the block.

the actionable object (obj 1016) is set so that it mimics the action af adding an item to the inventory when dizzy 'actions' it (it actually puts obj 2051 into the inventory), and disables the block (brush 2052) and trigger (obj 1016), when actioned. Then when you drop it, it drops the item, finds where the item is dropped in the map, and sets the block (brush 2052) and trigger (obj 1016) to the relevent positions relative to the block.

the following code replaces the first part of function DoPickupObject(idx) in action.gs (changes are in red). this uses object 1016 in the pickup code to mimic picking up object 2051, even though obj 2051 isn't an item:

func DoPickupObject(idx)
{
	class = ObjGet(idx, O_CLASS);
	[color="Red"]id = ObjGet(idx, O_ID);

	//allow object 1016 to be picked up, even tho it isn't an 'item'
	if(class==CLASS_ITEM[color="#ff0000"]||id==1016) // items are to be picked up in the inventory
	{
		ok = InventoryAdd(idx); // add item to inventory and return 1 if success or 0 if inventory is full
		if(!ok) // inventory is full
		{
			OpenDialogMessage("YOUR HANDSnARE FULL!");
			return;
		}

[color="Red"]		//if object 1016 is picked, disable all associated brushes + objects
		id = ObjGet(idx, O_ID);
		if(id==1016)
		{
			block = BrushFind(2052);
			BrushSet(block,B_DRAW,0);
			idx = ObjFind(2051);
			ObjSet(idx,O_DISABLE,1);
			ObjSet(idx,O_CLASS,0);
			idx = ObjFind(1016);
			ObjSet(idx,O_DRAW,0);
			GameCommand(CMD_REFRESH);
		}
		SamplePlay(FX_BEEP1);
		ObjSet(idx, O_DISABLE, 1); // disable object (picked up)
		idx = OpenDialogInventory(1); // open inventory and don't select an item; return selected item or -1
		if(idx!=-1) UseObject( idx ); // must use/drop something
	}

The following code is used in game.gs and is used to action the trigger pick up (obj 1016), and drop the item (obj 2051):

/////////////////////////////
//block
/////////////////////////////
func ActionObject_2051()
{
	//mimics picking the item up, even tho it isn't an item
	idx = ObjFind(1016);
	DoPickupObject(idx);
	PlayerEnterIdle();
}
func DropObject_1016()
{
	//check to make sure the player is stood on block material before dropping.
	//this avoids the player dropping it again straight from the menu in the 
	//last 'safe' position, which could have been on top of the block...
	x = PlayerGet(P_ X) -8;
	y = PlayerGet(P_Y)+4;
	w = 16;
	h = 8;
	rw = GameGet(G_ROOMW);
	rh = GameGet(G_ROOMH);

	//only action if material below player is solid
	if(MaterialCheckFree(x%rw,y%rh,x%rw+w,y%rh+h)==0)
	{
		//find position block should be in
		x = PlayerGet(P_ X) -8;
		y = PlayerGet(P_Y)+PlayerGet(P_H)/2-16;	

		//draw the static hidden brush.
		block = BrushFind(2052);
		BrushSet(block,B_DRAW,2);
		BrushSet(block,B_X,x);
		BrushSet(block,B_Y,y);
		GameCommand(CMD_REFRESH);

		//draw the dynamic hidden object.
		idx = ObjFind(2051);
		ObjSet(idx,O_DISABLE,0);
		ObjSet(idx,O_CLASS,1);
		ObjSet(idx,O_X,x-8);
		ObjSet(idx,O_Y,y-8);

		//draw the dynamic 'item' object.
		idx = ObjFind(1016);
		ObjSet(idx,O_DRAW,3);
		DoDropObject(idx);
	}
}

i know it looks complicated, but there isn't really any other way of easily doing it, and unfortunately you can't move static brushes out of their original room, so it's not much use if you want to use it in a few rooms.

if you need any of the code explaining further, please ask.

👍 0
#62204
don't re call doing all that when i made my chest item and stand able..

think i had it as an item and changed the collision bit..
However the difference might i had it so you could stand/use it anywhere as it was needed in two places.
👍 0
#62206
hmmmm i may be mistaken then, you may be able to pick a 'hard collision' item up if you're stood on top of it.
👍 0
#62207
should be able to..
i did it on Emerald city.. and I'm no wiz kid ad codeing..lol
you did have to stand on it.
👍 0
#62208
i think the reason i didn't do it like that in MSD was cause i wanted people to have to jump over it, rather than walking in front and it lifting you up...
👍 0