Is it possible to create a custom inventory where, if the player character has a stick of dynamite in his hand, the player can click on it, select a rock (for example) and the character will detonate the dynamite in front of the rock?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
if (keycode == eKeyM) {
if (player.Room != 1) {
if (player.Room ==2) player.ChangeRoom(1, 160, 120);
if (player.Room ==3) player.ChangeRoom(1, 312, 173);
if (player.Room ==4) player.ChangeRoom(1, 275, 119);
}
else player.ChangeRoom(player.PreviousRoom);
Jackson: Excuse me, sir?
MarketStall: G'day, mate.
MarketStall: What can I do ya for?
Jackson: Well, you see.
Jackson: I was wondering if you'd be so kind
Jackson: As to allow me to buy a stick of dynamite?
MarketStall: Hehehe...
Jackson: Yeah, I know.
Jackson: That sort of thing
Jackson: Would only happen in video games.
MarketStall: Hehehe...
MarketStall: I'll tell you what, my good mate.
Jackson: Yes?
MarketStall: As this is only a demo,
MarketStall: I'll let you have one on the house.
cJackson.AddInventory(iKey);
Jackson: Thank you very much.
[\code]
And this is the function:
[code=ags]
function cMarketStall_Talk()
{
dMarketDynamite.Start ();
}
[\code]
The issue is when I click the character in Talk mode, the conversation doesn't start.
function cWiseSage_Talk()
{
if (player.Room = 2) dCrystals.Start();
if (player.Room = 3) dMPTutorial.Start();
}
[\code]
I also get the following error.
GlobalScript.asc(535): Error (line 535): Parse error in expr near 'player'
What am I doing wrong here?
function cWiseSage_Talk()
{
if (player.Room != 2) dCrystals.Start();
if (player.Room != 3) dMPTutorial.Start();
}
{/code]
The game will run but bMPTutorial will run in room 2, skipping dCrystals entirely.
function MapScreen;
if ((keycode == eKeyM)
{
cJack.ChangeRoom(1)
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.092 seconds with 14 queries.