DizzyAGE General Coding Queries

Need help with using DizzyAGE then look here
Grandad
Hard Boiled Egg
Posts: 1573
Joined: Sat Aug 08, 2009 10:47 am
Location: Balham - gateway to the south

Post by Grandad » Wed Feb 16, 2011 9:40 am

Meph, I don't understand what a 'flip' is and what the difference is between that and say:

if (InventoryHasItem(***) && InventoryHasItem(****))

as a check that both required items are currently in the inventory when using an ActionObject or a CollideObject command ..and if I want to get rid of one of the items such as nails, but keep the hammer then I'd just add:

idx = ObjFind(***); //nails
InventorySub(idx);

Meph
Hard Boiled Egg
Posts: 2974
Joined: Fri Apr 13, 2007 12:47 am
Location: England, Suffolk

Post by Meph » Wed Feb 16, 2011 5:23 pm

Neither do i but it's always worked.. lol i've always done it this way..Id probably be better off using the InventoryHasItem,
Its always the cracked ones that let the light in

Meph
Hard Boiled Egg
Posts: 2974
Joined: Fri Apr 13, 2007 12:47 am
Location: England, Suffolk

Post by Meph » Mon Feb 21, 2011 8:05 pm

There has to be an easy way to find all the properties of a particular brush in the map editor?? can't find anything in the editor book about it, The only way i can find things is searching.. must be away to select a brush (like a spider) and see what it's properties are. :v2_dizzy_eek:
Its always the cracked ones that let the light in

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Mon Feb 21, 2011 8:22 pm

um, yes there is. right click on it (not in the 'select' mode), then select 'properties'.
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

Meph
Hard Boiled Egg
Posts: 2974
Joined: Fri Apr 13, 2007 12:47 am
Location: England, Suffolk

Post by Meph » Mon Feb 21, 2011 9:03 pm

i thought it was something like that, i didn't try it in 'paint mode' no wonder i was getting confused. :v2_dizzy_thumbsup:
Its always the cracked ones that let the light in

Meph
Hard Boiled Egg
Posts: 2974
Joined: Fri Apr 13, 2007 12:47 am
Location: England, Suffolk

Post by Meph » Mon Feb 28, 2011 8:51 pm

On the Hud/ coin counter can i change the colour from yellow?
Its always the cracked ones that let the light in

Grandad
Hard Boiled Egg
Posts: 1573
Joined: Sat Aug 08, 2009 10:47 am
Location: Balham - gateway to the south

Error Message

Post by Grandad » Wed Mar 02, 2011 12:39 pm

I've got an error message for what seems to be a simple action. The actual error is:

Code: Select all

BADARGCOUNT, 3,2,""
Code:-1
ObjSet: -1 <ActionObject_4002:9111< ActionObject:254< :24 <.

Code: Select all

ERROREXIT:GS9ERROR
-gserrorexit < GSErrHandler < gsYM;; Error < gsObjSet <gsVM;; Run< cDizScript;; Update < cDizGame;; Update < cDizApp;; Update <AppOnRun <e9App;; Run <main[/QUOTE]
I'm assuming it's checking the ActionObject 4002 command and the error is an ObjSet command, but I can't see a problem. There are a lot of more or less identical commands and I've checked that the mapping doesn't include more than one object id and there is no 'duplicate' of the checking an object's status. I've even added messages to try and see where it's falling over, but once obj 4074 has been set (and 'set message displayed), trying to action 4074 causes the error, before the 'this is' message is displayed. Am I missing something obvious?

Code: Select all

func ActionObject_4001() // down
{
if (ObjGet(ObjFind(4042), O_STATUS) == 1)
{
ObjSet(ObjFind(4042), O_STATUS, 0);
ObjSet(ObjFind(4042), O_DISABLE, 1);
ObjSet(ObjFind(4074), O_STATUS, 1);
ObjSet(ObjFind(4074), O_DISABLE, 0);
Message1 (3,3, "\"SET 4074 TO S1 ENABLE\"");
MessagePop();
return;
}
}

func ActionObject_4002() // left to right
{
if (ObjGet(ObjFind(4074), O_STATUS) == 1)
{
Message1 (3,3, "\"THIS IS 4074 STAT1 AND ENABLED\"");
MessagePop();
ObjSet(ObjFind(4074), O_STATUS, 0);
ObjSet(ObjFind(4074), O_DISABLE, 1);
ObjSet(ObjFind(4077), O_STATUS, 1);
ObjSet(ObjFind(4077), O_DISABLE, 0);
return;
}
}

Colin
Hard Boiled Egg
Posts: 594
Joined: Mon May 28, 2007 8:34 am
Location: Worthing, West Sussex, UK

Post by Colin » Wed Mar 02, 2011 4:05 pm

ObjSet -1 means it can't find the id on the map. If it is, check the properties for each of those items. It might be one is set to a static brush instead of dynamic
ImageImageImage

Colin
Hard Boiled Egg
Posts: 594
Joined: Mon May 28, 2007 8:34 am
Location: Worthing, West Sussex, UK

Post by Colin » Wed Mar 02, 2011 5:34 pm

Meph wrote:On the Hud/ coin counter can i change the colour from yellow?
find the coins section in func HandlerDrawHud() in handlers.gs
you need to add and alter this line before the HudDrawText line:-

HudColor(0xffffff00); // ffff00 = yellow

keep this part" 0xff ", and alter the following to the new colour.
If you use the colour palette in the editor, hover the cursor over your colour choice and it will give you the value that you need to enter.

Note:- any following text that hasn't had a HudColor set, will appear in the last colour used.
ImageImageImage

Meph
Hard Boiled Egg
Posts: 2974
Joined: Fri Apr 13, 2007 12:47 am
Location: England, Suffolk

Post by Meph » Wed Mar 02, 2011 7:17 pm

i didn't realaise i needed to add it , i was looking for something to change.. lol
Cheers, this will just make it easer for players to know whats what.
Its always the cracked ones that let the light in

Post Reply