Gamestudio Links
Zorro Links
Newest Posts
A3 projects
by Yopachi. 09/27/26 06:08
3D Game-Studio on Android!!!
by ratz. 09/26/26 21:25
Bug in train mode, or it seem to me
by mistery. 09/24/26 17:34
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Yopachi), 3,096 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Yopachi, Knull, Opus, Jubilee, lopezsergio07
19241 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 Offline
Expert
alibaba  Offline
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 | 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