News:

Rings of Reznor!

Main Menu

set state rage

Started by bearded, August 20, 2010, 04:12:56 PM

Previous topic - Next topic

bearded

how can i set a state to last an entire mission?
i think i see,
Object_SetPrimaryState(char,PCSTATE_ENRAGED,10)
and the 10 is for 10 seconds. how would i do infinite?
also is there a way to spawn a hero without it becoming one of the 4 selections? without changing the ai to cop or minion i mean. python wise.

bearded

i'm stumbling over the call object. seems like a simple thing to do. i spawn a random bad guy from a list, named randPick.
then i
Object_SetPrimaryState(randPick,PCSTATE_ENRAGED,10)
no good, calls a null on the object as error.
so i change randPick back to char and try char = randPick, which of course gives me the same error. then i try char=event.object and get the same error.
i'm confused.

DrMike2000

Is randPick a variable or his name?

If its his name, it should read 'randPick'

And never ever create a character with a capitalised letter in its name. The game converts all character names to lower case at some point, as I learned the hard way putting together the Horror in Strangers Mission 3.

eg 'randpick' or 'rand_pick' but never 'randPick'
Stranger Than Fiction:
The Strangers, Tales of the Navigator and Freedom Force X
www.fundamentzero.com

bearded

it's a variable.  e.g. random pick.
what i'm having trouble understanding is how to set up what python needs for it's variables in it's calls.
should i do a def that calls to another def? what exactly is an event.object?
i want to spawn from a list, and then set the state to that spawn to be enraged.
randPick is simply the name of the spawn drawn from a list. i can object spawn randPick, but when i objectsetprimarystate randPick, it calls null on the object as an error.

bearded

what i'm doing, is i have a level created wherein a number of random good guys are chosen from a list. you have to defeat or hold off the heroes while trying to discover what's gotten them so out of control. the reason is different every time you play the level. (no spoilers!) when you solve the puzzle, you win the mission.
i've managed to get the heroes to spawn, and activated the goals of making them attack the player, but they are still in the controllable 4, and i can't manage to enrage them.