![]() |
Select horse - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Select horse (/Thread-Select-horse) Pages: 1 2 |
Select horse - redblack - 02-14-2019 03:41 AM How to select the horse through the target when it is ridden by a PG? I tried these two: (<SRC.TARG.BODY> == c_horse_gray) (<ARGO.BODY> == c_horse_gray) but they work when the horse is not ridden. Thank you RE: Select horse - redblack - 02-15-2019 06:22 PM Can anyone help me? Thank you RE: Select horse - Soulless - 02-19-2019 09:15 AM findlayer.25.more1 I would recommend joining us on the discord also for quicker help ![]() https://discord.gg/aqsYZ3M RE: Select horse - redblack - 02-19-2019 08:32 PM Thanks for the reply, can you explain to me how to use it? I should look in the horse ridden by a PG if he has a memory ... I tried to use these commands: (<Findlayer.25.findid (i_xxxxx).amount> == 1) (<Findlayer.layer_horse.findid (i_xxxxx).amount> == 1) but they do not work! Can you help me? Thank you very much RE: Select horse - Coruja - 02-20-2019 04:04 AM honestly I don't undestand what are you trying to do but if you have a mounted char and just need to get the reference for its mount, you can use REF1=<FINDLAYER.layer_horse.MORE1> this will search the mount memory equipped on char (layer 25 = layer_mount), and the memory MORE1 value is the mount UID, so this UID value is passed to REF1 for easy referencing using <REF1.something> you just need to be careful to check if the mount really exist before call any other check, because if the char is not mounted, REF1 will be empty and will return console error if you try to use <REF1.something>. To avoid this you must first check if REF1 exists, like this: Code: REF1=<FINDLAYER.layer_horse.MORE1> RE: Select horse - redblack - 02-21-2019 02:59 AM What I want to do is check if the horse has a memory. I control it through the ".horse" function ... if the horse is not ridden by a PG through the target I select the horse and everything works, instead if it is ridden I can not select the horse but select the PG that is riding. RE: Select horse - redblack - 03-05-2019 01:41 AM can nobody help me? RE: Select horse - Coruja - 03-10-2019 07:57 AM the code will depend on how your script works (how memory item is created and where it got equipped) but usually you can use <FINDID.i_something> (for scripted memory items) or <MEMORYFINDTYPE.mem_something> (for hardcoded memory items) RE: Select horse - redblack - 04-03-2019 01:26 AM I just can't recall the memory when the horse is ridden by the PG ... I write the script of what I would like to do. I hope you can now understand and help me: [FUNCTION horse] TARGET @ 88 Select the horse you want to see ... SRC.TARGETF wears [FUNCTION wears] IF (<ARGO.BODY> == c_horse_gray) || (<ARGO.BODY> == c_horse_brown_dk) || (<ARGO.BODY> == c_horse_brown_lt) || (<ARGO.FINDLAYER.layer_horse>) IF (<argo.findid (i_memory_horse_1).amount> == 1) src.close_gump_horse SRC.DIALOG d_gump_horse_1 ELIF (<argo.findid (i_memory_horse_2).amount> == 1) src.close_gump_horse SRC.DIALOG d_gump_horse_2 ELSE SRC.DIALOG d_gump_horse ENDIF ELSE src.sysmessage @ 38 Not a horse. RETURN 1 ENDIF this way the script works perfectly if the horse is not ridden, but just world on the horse does not work. I hope I was clear. Can you help me? THANK YOU RE: Select horse - redblack - 04-08-2019 06:25 PM nobody knows how to help me? |