It is currently 16 Apr 2024, 14:20
   
Text Size

Adding sound and getting effect from named card?

Moderator: CCGHQ Admins

Adding sound and getting effect from named card?

Postby Sobol14 » 13 Feb 2016, 13:01

I'm screwing around and making a few of my own cards for a personal use and I have a couple of questions.

1. Is it possible to add a sound without removing any vanilla sounds and making it play when one of the mobs is using it's activated ability?

2. It it possible to have an equipment than giving a effect if it attached to any creature and also a secondary effect if it attached to a named creature.

Thanks in advance.
Sobol14
 
Posts: 2
Joined: 09 Feb 2016, 13:17
Has thanked: 1 time
Been thanked: 0 time

Re: Adding sound and getting effect from named card?

Postby RiiakShiNal » 13 Feb 2016, 15:04

The answer to both of your questions is yes.
  1. You just need to add the sounds and the special fx entries to reference.
  2. You just need to partition off the extra effect(s) with if EffectSource():GetParent():GetCardName() == "<SPECIAL_CARD_NAME>"
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 496 times

Re: Adding sound and getting effect from named card?

Postby Sobol14 » 13 Feb 2016, 16:28

Thank you. The equipment works like a charm =)

To clarify on the first question, will the sound play when any creature uses it's activated ability or can I just say which creature it should play for?
Also, I would be grateful if you write an example of what I need to write and where, I'm kinda lost of what I must do with specialfx.
Sobol14
 
Posts: 2
Joined: 09 Feb 2016, 13:17
Has thanked: 1 time
Been thanked: 0 time

Re: Adding sound and getting effect from named card?

Postby RiiakShiNal » 14 Feb 2016, 18:28

The SFX tag in the creature XML determines what Special Effects the creature uses for standard attacks (with specified min and max power so you can define it to use different special effects for different power ranges). The SFX tag can also be used in abilities to determine the special effects to use for a specific ability. The text used in the SFX tag specifies which of the defined special effects to use. Special Effects are defined in XML files in DATA_ALL_PLATFORMS\SPECIALFX\SPECIALFX in this format:
Code: Select all
<SFXSpecialFX>
  <!-- Typical Creature Attack SFX -->
  <SpecialFX name="<NameToUseInSFXTag>">
    <Emitter name="<EmitterFileNameWithoutExtension>" waitToFinish="1" playOnTarget="1" sound="<MP3FileNameWithoutExtension>" start="COMBAT_DAMAGE_PUSHED" watchStackForMove="1" />
  </SpecialFX>
  <!-- Ability Special Effect Entries will vary and for that you should look at other entries that are similar. -->
  <!-- Additional SpecialFX definitions go here -->
</SFXSpecialFX>
Emitters are found in: DATA_ALL_PLATFORMS\SPECIALFX\EMITTERS
Sounds are found in: DATA_ALL_PLATFORMS\SOUNDS
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 496 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 14 guests

Login Form