Judith on 5/9/2008 at 21:38
Scripting is probably the most annoying part of a T3 fan mission creation process. Conditions and Actions are quite clearly described but the thing whether a script works or not doesn't have to depend on the laws of logic. Instead of further discouraging our acolyte builders in newbie questions thread, we might start our discussion here, as Beleg suggested.
And here goes our first problem, I need a script and a property to make the volume inactive. Changing the value of bOutOfWorld from True to False doesn't work. Any ideas?
Beleg Cúthalion on 6/9/2008 at 07:09
So, if I got this right you want to turn off the function of a volume? What about giving it (i.e. not itself, but everything connected with that volume) an "active" flag/global thingy, whatever it's called, and check for this flag in every script related to it?
I.e. ...volume is active, volume_active flag is set to TRUE
any script would be: If player (...) enters the volume AND the active flag is TRUE, then...
The scripts to "turn off" the volume would just change the global flag to FALSE.
But only if you meant it that way. And if it works, hehe...
Judith on 6/9/2008 at 07:58
The flag and the conditions are not the problem :) Actually I want to activate the volume on a Goal:state change, there is a proper condition for it. Problem is, which property should I include in volume to make it active/inactive. bOutOfWorld doesn't work, as the volume is not a renderable thing.
Edit: It was easier than I thought, it's the "Enabled" property ;)
Beleg Cúthalion on 6/9/2008 at 09:18
That makes things definitely easier. Although I think my idea should have worked as well.
Inline Image:
http://www.eidosforum.de/images/smilies/addon/kratz.gifBut now we can turn to my patrol following issue. :p I made a switch [when I am frobbed by the player] which should make the TriggerScript-linked guard go to a small crate [make...approach...until etc.]. Doesn't work. Hell, I'm running out of ideas. :weird: Would someone suggest a step-by-step description just in case I missed something (which I believe is the cause)?
Flux on 6/9/2008 at 09:43
Here is how it works.
I make switch. Put generic frob and my script in it.
The script
When I'm frobbed by player
Make the linkedAI(triggerscript) approach linked object of (Alarm) until its 3 feet.
Now, the thing is make a triggerscript link from switch to AI and make an alarm link FROM AI to the object you want him to go nearby. It works.
The problem is he runs to it, so I don't know how it will help in your case for patrol. And, depending on the collision of the object, he might get stuck, so 3 feet is ok.
Alarm link doesn't mean much, as long as it's something different than triggerscript link. Make sure the alarm link runs from the ai to the object you want him to go nearby.
P.S I'm still loaded with work, when I find more time, I'll send you guys pms. (Judith about texture site, Beleg about "village").;)
Judith on 6/9/2008 at 10:25
Or, you can use patrol points instead.
Create a switch, make a patrol route, add AI and AI add point (but do not connect it to the patrol route, of course).
Create a script:
Condition: "when message Frob detected on Myself"
Action: Patrol: Enter patrol path pointed to by a Triggerlink named "put your name here"
Instert this script into AI (not AI add point), make a TriggerScript link from the switch base to AI, and from AI (again, not AI add point) to the desired patrol point.
Edit AI's links, find TriggerScript leading to the patrol point, in TriggerLink name put the name you chose in the script. Built, test, enjoy ;)
Beleg Cúthalion on 6/9/2008 at 14:43
To give a greater idea for those who haven't read all the posts I was refering to in my mind when writing the things above: I want to make a script for guards to follow another guard who's doing his patrol in the street. I don't want to set up another patrol or use the already existing one just because it would rip the guys apart in time (and because using one patrol for two made my game freeze several times).
I used the ACTION Flux mentioned (linked to MYSELF and go to linked via TriggerScript, that way it worked in a script by Rantako to make the Keeper Enforcers rally to a point where Garrett was seen) with a When-player-enters-map CONDITION (and others), tried several things to make it repeat every couple of seconds, linked the guards in every direction just to make sure one of them worked, but with no effect (see the newbie thread for it). Finally I made a script for a simple switch just to check if my previous CONDITIONS were crap, but it had no effect either.
That's why I've run out of ideas at the moment. Thanks for your efforts nonetheless. :)
Edit 1: Works, suddenly. :weird: I'll try to figure out how to make them walk.
Edit 2: When I use the "Make ...approach..." ACTION and place it on the following guard with source link = MYSELF and destination = Association link it works. However, if I only place one script on the patrol leading guard, making the source Assoc. links and the destination himself, it doesn't. But I'd like to make it that way because apparently the health state checks refer only to "this AI", so to make an intelligent CONDITION considering if he's still alive, I'd need a script on him. :erg:
ShadowSneaker on 7/9/2008 at 21:59
I'm trying to make an AI's weapon vanish upon death. Does anyone know how to do this?
I can make the AI disappear using the 'Destroy linked object MYSELF' action but I do not know which property to use to get rid of the weapon, if that can be done that way.
Thanks,
SS
Beleg Cúthalion on 8/9/2008 at 06:22
As long as your condition is clear, try the outofworld property. That's how they moved the rubble in the Cradle in stitchmode.
Judith on 8/9/2008 at 13:21
Guys, have you tried randomizing your loot/objects placement? Actually it's quite easy.
1) You have to define a new global var, give it your unique name, set the min. and max. values to e.g. 1 and 4, or 1 and 3, depending on the degree of variety you want to achieve (the number of possible places you want the item/loot to be "spawned"). Set expire on mission to -1 (never).
2) Create a script and put it into some placeholder or marker (playerstart will be fine):
Code:
C: When map starts, arriving from different map
A: Set [Your Global Var] to a random number from stream [String] between [Int] and [Int]
[Ints] should be set to desired value range (1 to 3, 1 to 4, etc.) I'm not sure what the stream name is used for, but I just entered something like 'Loot' and it works fine. Maybe this name can be utilized by another script, no idea so far.
3) Create your loot from actor browser. Add property from Advanced -> bOutOfWorld -> True. Place this item where you want it to be found by the player, duplicate it, choose another spot, etc. Repeat this as many times as you set it in the global variable value range (3, 4 or more).
4) Now you need to make a series of scripts and put each one into a different instance of your loot/object:
Code:
C: When [Your Global Var] becomes [equal to] [1]
A: Set [Property: bOutOfWorld] to [False] on linked objects [Myself]
You need to make as many scripts as number of values in your variable (3, 4 or more). All you have to do is to copy the first script and change the [Int] value to the next number, until you cover them all. I guess it will be more clear if you use the same name for all those scripts plus a number, e.g. ItemPlacement01, ItemPlacement02, etc.
5) Put those scripts in the instances of your loot, one script per object, of course. Compile scripts, compile your map, and test it. You should have only one instance of your object in your map, it will be randomly chosen everytime you enter your map for a first time. Btw. it might be a bit tricky, but remember to calculate your loot total properly (keep your loot list in a notepad maybe, or sth like that), as the editor will probably count every instance of it ;)