Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 1,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Can ent_morph be used with type PANEL* ? #367411
04/13/11 07:02
04/13/11 07:02
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
I keep getting 'Invalid arguments in set_current_car'

Code:
PANEL* car_pan =
{
	pos_x = 30;
	pos_y = 120;
	bmap = "car1.bmp";
	layer = 100;
	flags = SHOW;
}

function set_current_car()
{
       ent_morph(car_pan, "car2.bmp");
}



Re: Can ent_morph be used with type PANEL* ? [Re: bpc31] #367416
04/13/11 07:54
04/13/11 07:54
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
I found another way to do this:

BMAP* car = "car2.bmp";

function set_current_car()
{
//ent_morph(car_pan, car);
car_pan.bmap = car;
}

However still curious if ent_morph can be used on panels...

Re: Can ent_morph be used with type PANEL* ? [Re: bpc31] #367425
04/13/11 09:51
04/13/11 09:51
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Online
Expert
alibaba  Online
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
No it canīt be used for panels. As the name says ENT_morph so itīs only for entites wink


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Can ent_morph be used with type PANEL* ? [Re: alibaba] #367444
04/13/11 15:33
04/13/11 15:33
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
If this not work directly with bmp make some simple panel model in MED and then put this panel in model like skin. Now you can use ent_morph for change panels (models). Best thing is when you one time set entity (panel) positions, this work good on all resolution. I use something like this in my game.

If you want use entity istended of panel, you can try next:
Code:
ENTITY* car_pan = {
	type = "carpanel.mdl";
	layer = 5;
	flags = SHOW;
	VIEW = camera;
	pan = 270;
	x = 400; // here set your panel position
	y = 300;
	z = 200;
}


and later when you want change panel:
Code:
if (show_car == 1)   { ent_morph(car_pan,"carpanel2.mdl"); }



Last edited by Iglarion; 04/13/11 16:04.

IGRAVISION Page - www.igravision.com
RPG project - The Battle For Forgol 92.75%
Re: Can ent_morph be used with type PANEL* ? [Re: Iglarion] #367447
04/13/11 15:43
04/13/11 15:43
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Panels are completely different type structures compared to entities. You can't expect to use a PANEL* in a function that specifically requires an ENTITY* any more than you can expect to use a BMAP* where you need a STRING*.

What you need to do is use bmap_load or something to load a bitmap into your car_panel.bmap.


Eats commas for breakfast.

Play Barony: Cursed Edition!

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1