using an inventory item on a flash button i'm trying to figure out a way to be able to use an inventory item on a flash button
sort of like:
if
inven item key cursor on (release)
then
changephase do something
if i can find a way it would mean i wouldn't need the verb disc at all
any help would be great..
bigmac- 04-13-2008
... don't all inventory items react to objects on click? This should play right into the existing system, shouldn't it?
NigeC- 04-13-2008
if you have a an arrow cursor assigned to "use", it'll override the item cursor so you can't use an inventory item on the sprite
So i thought about doing it with flash instead but i don't know how to do it
so if the item cursor is a key it opens the door, if its normal cursor it does something else, ie a sequence saying its locked
its just an inconsistency really, a myst style game zooms in on something you can look at, one click is good enough to start a convo, but something that needs unlocking/invent need the verb disc at the moment
bigmac- 04-13-2008
Nige... Why use an arrow cursor then? Can you just run everything off item cursors? I guess I'm not sure what you mean by "use flash buttons". Everything within Lassie is already a Flash button for all intents and purposes.
NigeC- 04-13-2008
nearly every thing is using the inventory items set as cursors
it just when i need an inventory action i can't work out
for example:
on (rollOver) {
_root.TIMe.setItemCursor('up');
}
on (release)
{
_root.TIMe.changePhase('room1', 'back', 3);
_root.TIMe.changeRoom('room1','start',4,null,null);
_root.runActions();
}
on (rollOut) {
_root.TIMe.setItemCursor('_none');
}
the above, on rollover changes the item cursor to "up"
on release it goes to room1 and changes the "back" (background sprite) to phase 3 which is the rooms 180 degree angle view
roll out goes to regular cursor
I don't know how to do it so its conditional, if its a key itemcursor or the regular cursor
bigmac- 04-13-2008
Oie... given that this is clearly a hack solution, I'll have to give you a hack fix. Dig out the ol' Lassie DOM diagram. Target the cursor's item-image MovieClip and check its current frame to see what cursor frame is currently displayed. I don't have the DOM in front of me, but I believe you'd target it as something along the lines of...
if (_root.cursor_mc.item_mc._currentframe == 1)
{
// do stuff.
}
Again, reference the DOM for the proper object names / paths. Unfortunately, you cannot extract a clip's current frame label with AS2 (a massive drawback that was thankfully addressed in AS3), so you'll have to -*test*-('") item cursor frames based of their frame number.
NigeC- 04-14-2008
thanks for that Greg I'll let you know how i get on :)
NigeC- 04-15-2008
mm, it doesn't seem to work.. but thats probably me :oops:
plus i still have the problem with cursor switching to the action cursor :?
My brain just isn't working right now, a m8 got killed in a M/C accident last week
bigmac- 04-15-2008
Oh no... I'm really sorry to hear that. My sympathies and all the best to his family.
That's a very common irony in Scuba Diving too... instructors and trained professionals often get too comfortable with open water and end up dead in it. In some respects, you can think of it as the law of averages: people who engage in potentially dangerous activities regularly for long periods of time without incident may have the odds finally even out in a fatal accident.
NigeC- 04-15-2008
Steve Irwin is a valid case in point.. i'm pretty sure a stingray wouldn't of been high on his *must worry about" list
But yeah M/C's you are on a knife edge all the time, if you last the first few years without hurting yourself your destined to a long carreer at it, but, you can't protect yourself from others and their stupidity.
I must admit, last year I was wondering why i bother, there's just so much traffic on the roads, and every day it just seemed a fight to stay in one piece.
god this thread is totally off topic lol
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.