Sorry for the incredibly late reply, but thank you so much Khris, I was able to get it to work perfectly with your help!! You're the best, man!!

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 else if (keycode == eKeyF1)
if (player == cEgo) {
cRoger.SetAsPlayer();
cEgo.FollowCharacter(cRoger, 0, 20);
}
else if (player == cRoger){
cEgo.SetAsPlayer();
cRoger.FollowCharacter(cEgo, 0, 20);
}
Quote from: Crimson Wizard on Tue 05/03/2024 17:49:01have you put cEgo_AnyClick function to corresponding AnyClick event in the events table?Oh my gosh, you were right... I just overlooked the "AnyClick" event on Ego... My biggest problem with anything is that I always overlook the simplest of things!!!! Thank you so much for your time and wisdom!!!
Quote from: Crimson Wizard on Tue 05/03/2024 16:00:13This error usually means that you have some function name inserted into events table of this given hotspot, but the actual function does not exist, so engine cannot run it.Oh my gosh, ok. I finally understand how events work, I guess it just wasn't clicking in my head until just now. I was able to stop that error, and also able to get the Sniff action to work with Ego after realizing this too, sorry for my ignorance ^^"
Quote from: Crimson Wizard on Tue 05/03/2024 16:00:13You don't, like I mentioned, in the case of any more verbs you will have to use "AnyClick" event and check active mode using "mouse.Mode".So, I have tried this. I made a dummy cursor just to test having more cursors, and called it "Bark", inspired by your example in your first reply. However, when I use this code in the globalscript:
function cEgo_AnyClick()
{
if (mouse.Mode == eModeSniff)
{
Display("Smells like... Blueberries?");
}
else if (mouse.Mode == eModeBark)
{
Display("Don't yap your mouth!");
}
}
Quote from: Crimson Wizard on Tue 05/03/2024 11:41:39As you may notice, there are 2 extra interactions there, called Usermode1 and Usermode2. These are 2 reserved events for custom actions. If you rename an existing cursor type, then these events will be renamed automatically.So, before I had just created an entirely new cursor, and it wouldn't work. When I used your advice and made a carbon copy of the new cursor onto Usermode1, it worked, and showed up in the events of the hotspot! Does this mean I can only have two extra verbs? How can I get a newly created cursor to show up in events when I use up both Usermodes?
RunScriptFunction: error -18 ()trying to run 'hHotspot0_Mode8' (Room 1)
function cEgo_Talk()
{ //this code isnt mine, but I am including it to show that this action works as intended when trying to talk to Ego...
Display("Talking to yourself is a sign of madness!");
}
function cEgo_Sniff()
{ //And this is my code, which does not produce the same expected dialogue box as using the other actions on ego, and also sniffing the orb works, so I am not sure why this doesn't
Display("Smells like... Blueberries?");
}
function cEgo_AnyClick()
{
if (mouse.Mode == eModeSniff)
{
Display("Smells like... Blueberries?");
}
}
function cEgo_Sniff()
{
Display("Smells like... Blueberries?");
}
function hGlowingOrb_Sniff()
{
Display("Smells a bit burnt...");
}
Quote from: Khris on Mon 04/03/2024 17:20:15Unfortunately, while that template does have some options, adding a 5th verb isn't one of them.Ah ok. Thank you for your input! Would the Sierra style template be better for implementing more actions like what I'm wanting?
I was rewriting it for somebody else who wanted six buttons, and it was a lot of work, since it is hard-coded for four buttons almost everywhere in its script.
function hGlowingOrb_Sniff()
{
player.Say("It has a sort of burnt smell to it.");
}
Quote from: Crimson Wizard on Sat 05/09/2020 23:42:54Alright, what would be the best of of going about that?
I could try exe too, maybe something comes up... but game sources are the files that lie in the project root folder: *ash/*asc, *.agf, *.crm files and so on.
Quote from: Crimson Wizard on Sat 05/09/2020 22:52:25How should I go about doing that?
If it's just a test game, could you upload it somewhere for us to look in?
Quote from: Crimson Wizard on Sat 05/09/2020 14:36:16Ok, this is my bad for not clarifying earlier.
In above script examples you keep alterating between "cDummy", "cRoger" and "player". You have to be consistent there. Who is "cDummy" and "cRoger"? is anyone of these a player character? who is a character that has a pillow in inventory? Who is a character whose inventory is displayed by inventory window?
Quote from: Cassiebsg on Sat 05/09/2020 12:20:28Nope, the pillow isn't in the starting inventory, I just checked.
You sure the player isn't starting with a pillow already in inventory? Maybe you gave him one to test some other code and forgot to remove it?
EDIT: Only other thing I can think of, is try to use player.LoseInventory instead for cRoger or cDummy.... if they're the player doesn't matter, but if their not, it does matter.
Quote from: Cassiebsg on Sat 05/09/2020 10:17:52
Can you show the pick up code?
// PICKUP
else if(Verbs.UsedAction(eGA_PickUp)) {
player.Say("Fine, its really comfy.");
oPillow.Visible = false;
oKey.Visible = true;
player.AddInventory(iPillow);
}
Quote from: Slasher on Sat 05/09/2020 08:30:49
Maybe it's the Tumbleweed template coding..
function oBed_UseInv()
{
if(player.ActiveInventory==iPillow){
player.Say("Fine, I'll make my bed!");
oPillow.Visible=true;
player.LoseInventory(iPillow);
}
}
function oBed_UseInv()
{
if (player.ActiveInventory == iPillow) {
player.Say("Fine, I'll make my bed!");
player.LoseInventory(InventoryItem iPillow);
oPillow.Visible = true;
}
}
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.035 seconds with 15 queries.