Please login or register.

Login with email, password and session length
 

News:

Happy 15th Birthday, Freedom Force!


Author Topic: My first ffx plug-in for EZ Scripts - dream effect  (Read 476 times)

Offline mac402

  • Jr. Member
  • Posts: 84
My first ffx plug-in for EZ Scripts - dream effect
« on: March 17, 2015, 02:38:24 PM »
Hi! I managed to write a cutscene plug-in for EZ Script, or rather I used a template from the "uses power" plug-in. Anyway this can be used to trigger the dream/hallucination ripple effect seen in some missions in  :ffvstr:. The cutscene commands for EZ Script are <character> dream start and <character> dream end. The character reference should be made obsolete as it is not needed for anything, but I can't find a way to do it without messing up the script.

Here is the code for plug-in (which should be placed in "<modname>\Missions\Scripts\ffxplugins\active\<pluginfoldername>\<pluginfilename>.py" file):

Code: [Select]
import ff
import js

import m25event
import m25string
import m25cutscene
from m25cutscene import *


m25event.Event_RegisterEvent('pstory_cutsceneline', 'CutsceneDream_Check', persistent=1)

def CutsceneDream_Check(event):
line = event.object
found, user, remainder = m25string.SplitAroundPhrase(line,'dream')
if found:
switch = remainder
target = user
command = 'CutsceneDream_DoDream("%s","%s","%s")'%(user,switch,target)
actors = [user,target]
return [command,actors]
else:
return None

def CutsceneDream_DoDream(cs_num, user, switch, target):
m25event.SetTimer(1, 'PlayCurrentCutscene', user=cs_num)
if switch=='start':
ff.RENDER_WARP = 1
Mission_FadeDreamSinParams(1, .03, .35, .75)
Mission_StartDreamWave(5,-1,0)
if switch=='end':
ff.RENDER_WARP = 1
Mission_FadeDreamSinParams(1, .03, .35, .75)
Mission_StartDreamWave(0,0,1)

Offline Epimethee

  • Patron god of afterthought
  • Hero Member
  • Posts: 2753
  • Currently in suspended animation
    • FFX add-on for FFvsTTR
Re: My first ffx plug-in for EZ Scripts - dream effect
« Reply #1 on: March 24, 2015, 01:02:05 AM »
Good idea, Mac!
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

Offline cmdrkoenig67

  • Heroic Space-case!
  • Hero Member
  • Posts: 3256
  • Bleh...
    • FRP Unlimited 2 Back Up Site!
Re: My first ffx plug-in for EZ Scripts - dream effect
« Reply #2 on: April 02, 2015, 02:32:52 PM »
Mac, that's a great plug in to have for mods, etc...bravo!

Dana