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
0 registered members (), 1,094 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap - invisible? #297564
11/08/09 11:21
11/08/09 11:21
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hello Folks,
Does anyone know how to make a bmap (key laying on floor) go invisible when clicked (the mouse pointer then takes on another bmap of the key - that works just fine, but the original bmap on the floor is still there.

It would seem that 'invisible' won't work in lite_c, is there something else? I've looked in the manual, but can't find it.

David

Re: bmap - invisible? [Re: DAVIDMORETON] #297572
11/08/09 14:03
11/08/09 14:03
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline
Member
seecah  Offline
Member

Joined: Apr 2009
Posts: 248
Philippines
Wew.. have you tried

set(panel, SHOW);

then

reset(panel, SHOW); to hide?



Can't is not an option™
Re: bmap - invisible? [Re: seecah] #297581
11/08/09 15:23
11/08/09 15:23
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hi seecah,
Thanks for reply. Have tried using as you suggested but no luck. I must be doing something wrong.
I have the line:-

BMAP* key_map = "key1map2.bmp";

Which I place on the floor (the picture, that is!), What I need is some way of removing it or making it invisible.
any ideas?
David

Re: bmap - invisible? [Re: DAVIDMORETON] #297649
11/09/09 03:05
11/09/09 03:05
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline
Member
seecah  Offline
Member

Joined: Apr 2009
Posts: 248
Philippines
Haven't you make any panel that contains your bitmap???



Can't is not an option™
Re: bmap - invisible? [Re: seecah] #297665
11/09/09 08:07
11/09/09 08:07
Joined: Oct 2008
Posts: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
Germany
Don t try SHOW, use VISIBLE!

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=34473&Number=281931#Post281931

Ok, it s wrong but it have helped me.
(SHOW for bitmaps, VISIBLE/INVISIBLE for Entitys)

set(panel, VISIBLE);
reset(panel, VISIBLE);

same like INVISIBLE...

Last edited by Ayumi; 11/09/09 08:17.
Re: bmap - invisible? [Re: seecah] #297736
11/09/09 14:33
11/09/09 14:33
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Thanks for your reply Ayumi,

I've only just started on lite_c (done c_script for ages),
Can't find how to put bit map into panel, and how to refere to it in the script.

David.(am taking the anti-thick pills, hope they work soon!)

Re: bmap - invisible? [Re: DAVIDMORETON] #297740
11/09/09 15:32
11/09/09 15:32
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hello Seecah & Ayumi,
Many thanks for your help. (the anti-thick pills seemed to have worked, somewhat)
Below is my code (in lite_c) in case it helps anyone else.
(there have been 88 'hits' to date, so someone's interested!)

I did'nt want to get involved with panels, just wanted to use a simple bit-map which went invisible when 'clicked'.

BMAP* key_map = "key1map2.bmp";


function pickup()
{
if(event_type = EVENT_CLICK);
{
..... //switches key for 'key' mouse map
....
...
ptr_remove(key_map);
}}

action key //apply to key bit map(on floor in my case)
{
key_map = my;
key_map.flag = SHOW | OVERLAY;
my.emask | ENABLE_CLICK;
my.event = pickup;
}

This works just fine,
again, thanks for help, David

Re: bmap - invisible? [Re: DAVIDMORETON] #297839
11/10/09 10:12
11/10/09 10:12
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Thats still all wrong. It may work by chance but will likely crash later. Here is the right code.

function pickup()
{
if(event_type = EVENT_CLICK);
{
ent_remove(me);
}}

action key() //apply to key bit map(on floor in my case)
{
set(my,OVERLAY);
my.emask |= ENABLE_CLICK;
my.event = pickup;
}

Dont assign an entity to a BMAP* pointer and dont set the SHOW flag for a level entity!


Re: bmap - invisible? [Re: Spirit] #297906
11/10/09 17:00
11/10/09 17:00
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hey, Thanks spirit,
saved the day again! I would have blown a fuse if I had completed the level, and it crashed for no apparent reason!

Just goes to show that 'fiddling about' to make it work ain't always a good idea - and I thought I was doing so well!!!

Thanks again, David

your code works just fine, but now I have another problem:-

if I omit the section "&&(mouse_map==keymap)" it works OK, except any mouse map (cursor) opens the door'.
If I add the above, the engine throws it out with 'syntax error' - what is the error please?

Here's the code:-


BMAP* goldkey = "goldkey1.bmp";
//the mouse map changes to this

function open_event() //door
{
if(event_type == EVENT_CLICK) &&( mouse_map==goldkey)
{
mouse_map=0;
while(my.pan<180)
{
my.pan+=2*time_step;
wait(1);
}}}

action door()
{
my.emask |=ENABLE_CLICK;
my.event=open_event;
}

This works fine in c_script, but seemingly not in lite_c. I don't understand this, and can find no ref. to this problem in the mamual. Hopefully , David

Last edited by DAVIDMORETON; 11/10/09 17:22.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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