Warrior
|
|
|
Posts: 60
|
|
|
Last seen: Dec 19, 2021 8:44:05 GMT
|
|
Post by HeroX1 on Jun 21, 2020 3:35:32 GMT
Hello, I'm trying to use the UseSkill condition for my quest but it isn't working, maybe I'm missing something.
{ Event 1 { Condition UseSkill(Player, SuperSaiyanLevel12) Action PlayDialogue(Dialogue0, 1000, "BFkoh", -1) Action SetFlag (Flag1,true) } Event 2 { Condition CheckFlag (Flag1,true)
Action HealthCap (false,Player,100.00) Action Wait (1.0) Action HealthCap (true,GokuEnemy,5.0) Action ShowTip (Unlock,false) }
X2mMod SuperSaiyanLevel12 { name: "Super Saiyan Level 1 Awoken" guid: "aa3f4427-b384-eaf3-59f8-740b7860de01"
|
|
Hero
|
|
Posts: 185
|
|
|
Last seen: Oct 1, 2024 12:00:11 GMT
|
|
Post by bbvenom on Jun 21, 2020 10:19:25 GMT
UseSkill cannot be called on characters with "HUMAN" ai as far as I know. I was struggling with it too. In the end I just used a stand-in character that was an exact copy of the player. Though with transformations? No idea on that one honestly... (Also just in case: The character must have enough Ki on them at the moment you call UseSkill action)
I noticed you used a Wait action - for some reason you cannot use more than one in one Event. Just thought I'd prevent you a headache x).
|
|
Warrior
|
|
|
Posts: 60
|
|
|
Last seen: Dec 19, 2021 8:44:05 GMT
|
|
Post by HeroX1 on Jun 21, 2020 16:06:46 GMT
That's interesting since UseSkill is used during the quest you unlock Super Saiyan and it works fine. Can you explain the stand-in character thing for me please? Thanks again for helping me out.
|
|
Hero
|
|
Posts: 185
|
|
|
Last seen: Oct 1, 2024 12:00:11 GMT
|
|
Post by bbvenom on Jun 22, 2020 13:24:57 GMT
Where did you find the quest files for the SS quest? O.O
A stand-in, as a exact copy of your character. Meaning it is the same, but controlled by a COM instead of Player. You can inflict more commands on it. Like disabling it's movement (or better yet, changing ait_table_entry), setting up ki and dialogue, then enabling movement and using a skill. This works fine usually. There are exceptions here and there but you just have to work around those in whatever way works for you.
|
|
Warrior
|
|
|
Posts: 60
|
|
|
Last seen: Dec 19, 2021 8:44:05 GMT
|
|
Post by HeroX1 on Jun 22, 2020 17:30:11 GMT
BAQ_CCR_POW is the Super Saiyan quest
|
|
Hero
|
|
Posts: 185
|
|
|
Last seen: Oct 1, 2024 12:00:11 GMT
|
|
Post by bbvenom on Jun 23, 2020 14:04:07 GMT
Thank you.
Also my apologies but I thought you were talking about Action UseSkill, not Condition of the same name x). So what do you want to achieve with your condition? Do you get some sort of compilation error or it just fails to work properly in the PQ itself?
Also also, two things:
It is generally a good idea to call CancelDialogue right before calling a custom dialogue. That is, if you want the dialogue to trigger right away. If you are fine with it activating only once the automatic dialogue in-game is finished, then you can ignore this note.
The more important thing though: Always call flags as the very first actions in an event.
For example if you have:
_______________________________________
Event 3 ;If GokuBasePlayer is hit with Poison, he gets knocked out { Condition HitWithSkill(GokuBasePlayer,6330) Action SetFlag(Flag2,true) Action DamageHp(GokuBasePlayer,102.0) }
...
Event 104 ;GokuBasePlayer is defeated NOT by poison { Condition Ko(GokuBasePlayer,true,-1) Condition CheckFlag(Flag2,false) Action CancelDialogue Action PlayDialogue(GPD,1,"BFsmt",-1) } Event 105 { Condition DialogueFinish(GPD) Action GotoState(2000) } Event 106 ;GokuBasePlayer is defeated BY poison { Condition Ko(GokuBasePlayer,true,-1) Condition CheckFlag(Flag2,true) Action CancelDialogue Action PlayDialogue(GKBP,1,"BFsmt",-1) } Event 107 { Condition DialogueFinish(GKBP) Action GotoState(2000) }
___________________________________
And you called the Flag AFTER Goku was script-killed, the incorrect part of script would trigger, then the correct one and it would mess up the script and cause it to get stuck. If you do not require laser-precision in your script timing then it is whatever, but in this example (taken from my script) it would break the quest.
|
|
Warrior
|
|
|
Posts: 60
|
|
|
Last seen: Dec 19, 2021 8:44:05 GMT
|
|
Post by HeroX1 on Jun 24, 2020 2:40:09 GMT
The idea is that when you transform to the specified skill (Super Saiyan Level 1) the health gates are unlocked and you can begin the battle. The dialogue is mostly used as a notification to let me know that it works. I'll fix the flag placement. Thanks again! =============================================== State 1 { Event 0 { Condition Always Action EquipSkills (Player,true,SUPER1|SUPER2|SUPER3|SUPER4|ULTIMATE1|ULTIMATE2|AWAKEN|EVASIVE) Action SetStat (Player,KI,1000) } Event 1 { Condition Ko (Player,true,0)
Action PlayDialogue(Dialogue0, 1000, "BFkoh", -1); Dialogue: Let me show you my new power...! C'mon, I'll take every one of you on! --- Stage: Wasteland Action QuestFinishState(FAIL) Action QuestClear } Event 2 { Condition Always Action SetFlag (Flag1,false) Action HealthCap (true,Player,100.00) Action HealthCap (true,GokuEnemy,100.00) Action ShowTip (Unlock,true) Action GotoState (2) } } State 2 { Event 1 { Condition TimePassed (>=,10.0) ;Condition UseSkill(Player, SuperSaiyanLevel12) Action PlayDialogue(Dialogue16, 1000, "BFkoh", -1) Action SetFlag (Flag1,true) } Event 2 { Condition CheckFlag (Flag1,true)
Action HealthCap (false,Player,100.00) Action Wait (1.0) Action HealthCap (true,GokuEnemy,5.0) Action ShowTip (Unlock,false) } Event 3 { Condition Health (<=,GokuEnemy, 5.0) Condition CheckFlag (Flag1,true) Action SetInvulnerable (GokuEnemy,true) Action PlayDialogue(Dialogue0, 1000, "BFkoh", -1); Dialogue: Let me show you my new power...! C'mon, I'll take every one of you on! --- Stage: Wasteland Action QuestFinishState(COMPLETE) Action QuestClear } } ================================================================================================================
|
|
Hero
|
|
Posts: 185
|
|
|
Last seen: Oct 1, 2024 12:00:11 GMT
|
|
Post by bbvenom on Jun 25, 2020 13:41:36 GMT
It seems to be a problem specifically with Awoken skills. This: __________________________ Event 2 { Condition UseSkill(Player,1114)
Action ShowTip(TITEOB,true) } __________________________ fired off flawlessly.
(Even vanilla awoken skills get ignored) So I guess... Look for a different way to do it?
Though 25000 (Super Saiyan from that quest) works even in a PQ. I think it is just greatly limited...
|
|
Warrior
|
|
|
Posts: 60
|
|
|
Last seen: Dec 19, 2021 8:44:05 GMT
|
|
Post by HeroX1 on Jun 25, 2020 14:13:11 GMT
I just made it a time passed condition, I made the UseSkill into a comment.
|
|