Hey, I'm working on the temple of ikov quest.
I'm at the part where you attach the lever handle (id 83) to the lever bracket (id 86).
I cannot "use" the lever handle on the bracket, it does nothing (my character does not move) and I receive no dialogue saying that there's an unhandled interaction or so.
Also, I'm wondering when I figure out the point above, how I would transform the lever bracket into a complete lever.
Transforming scenery object
- Ceikry
- Site Admin
- Posts: 589
- Joined: Wed Aug 10, 2022 11:48 pm
- Location: Draynor Village
- Has thanked: 82 times
- Been thanked: 108 times
Re: Transforming scenery object
Have you created code to handle such an interaction? If so, post it.whoosh wrote: ↑Sat Sep 03, 2022 2:11 pm Hey, I'm working on the temple of ikov quest.
I'm at the part where you attach the lever handle (id 83) to the lever bracket (id 86).
I cannot "use" the lever handle on the bracket, it does nothing (my character does not move) and I receive no dialogue saying that there's an unhandled interaction or so.
This is one of the things Varbits are for, read up about all of that here.whoosh wrote: Also, I'm wondering when I figure out the point above, how I would transform the lever bracket into a complete lever.
Nerds
Re: Transforming scenery object
I'm not sure what code I need to add for this, I added a listener like so:
Code: Select all
on(Scenery.LEVER_BRACKET_86, SCENERY, "use") { player, bracket ->
println("Using lever on bracket...")
// Check that I have the lever handle and do something to make this a complete lever
return@on true
}
- Ceikry
- Site Admin
- Posts: 589
- Joined: Wed Aug 10, 2022 11:48 pm
- Location: Draynor Village
- Has thanked: 82 times
- Been thanked: 108 times
Re: Transforming scenery object
whoosh wrote: ↑Sat Sep 03, 2022 2:19 pm I'm not sure what code I need to add for this, I added a listener like so:
Code: Select all
on(Scenery.LEVER_BRACKET_86, SCENERY, "use") { player, bracket -> println("Using lever on bracket...") // Check that I have the lever handle and do something to make this a complete lever return@on true }
Code: Select all
onUseWith(SCENERY, Items.LEVER_WHATEVER, Scenery.LEVER_BRACKET_86) {player, bracket ->
/** code **/
}
Nerds
Re: Transforming scenery object
Yeah same problem, it doesn't say I have an unhandled interaction, there's just no interaction:
https://cdn.discordapp.com/attachments/ ... backet.mov
https://cdn.discordapp.com/attachments/ ... backet.mov
- aweinstock
- Developer
- Posts: 31
- Joined: Thu Aug 11, 2022 1:17 am
- Been thanked: 14 times
Re: Transforming scenery object
Scenery objects that have an examine but no left-click options incorrectly didn't get loaded into the map server-side (so they appear as null for use-item-with-scenery interactions when choosing which handler to dispatch to). That's fixed in !758, so rebase onto 24d42a4c70c6bff18d4d192a982a7956707f1680 until that's merged.
- aweinstock
- Developer
- Posts: 31
- Joined: Thu Aug 11, 2022 1:17 am
- Been thanked: 14 times
Re: Transforming scenery object
"Lever bracket" 86 and "Lever" 87 don't seem to have varps or varbits associated with them, nor is there a wrapper object that contains them.Ceikry wrote: ↑Sat Sep 03, 2022 2:17 pmThis is one of the things Varbits are for, read up about all of that here.whoosh wrote: Also, I'm wondering when I figure out the point above, how I would transform the lever bracket into a complete lever.
Code: Select all
86: SceneryDefinition { name: "Lever bracket", models: [2092], configuration: [4], interactable: Some(1) }
87: SceneryDefinition { name: "Lever", models: [2108], configuration: [4], interactable: Some(1), options: [Some("Pull"), None, None, None, None] }
- Ceikry
- Site Admin
- Posts: 589
- Joined: Wed Aug 10, 2022 11:48 pm
- Location: Draynor Village
- Has thanked: 82 times
- Been thanked: 108 times
Re: Transforming scenery object
yup, already been acknowledged. Some of this discussion leaked into the discord because he pinged me with a video.aweinstock wrote: ↑Sat Sep 03, 2022 3:21 pm"Lever bracket" 86 and "Lever" 87 don't seem to have varps or varbits associated with them, nor is there a wrapper object that contains them.Ceikry wrote: ↑Sat Sep 03, 2022 2:17 pmThis is one of the things Varbits are for, read up about all of that here.whoosh wrote: Also, I'm wondering when I figure out the point above, how I would transform the lever bracket into a complete lever.
Code: Select all
86: SceneryDefinition { name: "Lever bracket", models: [2092], configuration: [4], interactable: Some(1) } 87: SceneryDefinition { name: "Lever", models: [2108], configuration: [4], interactable: Some(1), options: [Some("Pull"), None, None, None, None] }
Nerds