PDA

View Full Version : Effects


Mindtwistah
06-13-2007, 12:40 PM
Can someone tell me how I can make these effects/boosts.
Force speed for 2 minutes
Increased intelligence
Increased strenght

For example, if I put it in a dialog it would be something like this:

-Come and try these pills. It will make you stronger[NPC]
-Ok, I want a pill [PC] [Inject script that increases your strenght]

Or:

-Try these pills. It will make you faster [NPC]
-OK[PC] [Inject scripts that gives you force speed for 2 minutes]

You get the point.

stoffe
06-13-2007, 01:16 PM
Can someone tell me how I can make these effects/boosts.

Which game is this for? Assuming KOTOR 1:


Force speed for 2 minutes

// Boosts speed, Defense and +1 attack for 2 minutes.

void main() {
effect eSpeed = EffectMovementSpeedIncrease(99);
eSpeed = EffectLinkEffects(eSpeed, EffectACIncrease(4));
eSpeed = EffectLinkEffects(eSpeed, EffectModifyAttacks(1));

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, GetFirstPC(), TurnsToSeconds(2));
}


Increased intelligence

Gives 4 extra Intelligence for 2 minutes

void main() {
effect eInt = EffectAbilityIncrease(ABILITY_INTELLIGENCE, 4);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInt, GetFirstPC(), TurnsToSeconds(2));
}


Increased strenght

Gives 4 extra Strength for 2 minutes:

void main() {
effect eStrength = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStrength, GetFirstPC(), TurnsToSeconds(2));
}

Mindtwistah
06-13-2007, 01:25 PM
Thank you very very much Stoffe