Aller au contenu

spider move/leave (general question)


1 réponse à ce sujet

#1
Guest_dewkl_*

Guest_dewkl_*
  • Guests
 If you remember orthan thaig you remember some sections where spiders would flee from you and (eventually) "web up". These were triggers connected to a spider_leave and spider_move-script. This is more of a general scripting question;

Are the scripts that come with the main module just templates for the ones bioware used? If you want four spiders to move at four seperate occasions, do you then need 4 different scripts?

I also noticed these spiders aren't attackable while they are performing this. Is this set in some script as well? Because the variable/creature can't be altered to change "teams" (to neutral) it seems, only the creature resource. 

Edit: You can change the variable group; 3 is neutral, 2 is friendly and 1 is hostile. 

Modifié par dewkl, 31 mars 2010 - 05:03 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
The scripts you see in the single player module are a combination of fairly generic scripts meant to be used anywhere, and specific scripts for specific places. In general, if it has the three letter prefix ‘gen’, it's probably a generic system. Otherwise, it's probably specific to a plot. The line is a bit blurry (gen scripts often make specific reference to the followers) though, so you have to look into each script to tell.



In this case, the scripts spider_leave and spider_move are trigger scripts that give move/disappear orders. They are used multiple times, and I suppose could be used again by you. The tag of the spider has to match the tag of the trigger, and the tag of the waypoint (for the move trigger) is mp_<creature_tag>_#, with # being the variable stored in TRIGGER_COUNTER_1.



The command for making spiders come down from the ceiling or go back up is WR_SetObjectActive(), with TRUE if you want them to come down and FALSE if you want them to go back up. UT_TeamAppears() will do the same thing to a whole team of spiders. Where to put that line of code depends on what you want to trigger the spiders. It could be a trigger or a plot flag or even some custom AI on the spider.



The spiders won't be attackable while they are ascending, because they have just been set inactive. If you want to make them un-attackable in another way, you can use SetGroupId(oSpider, GROUP_NEUTRAL); If you further want them to be unelectable, use SetObjectInteractive(oSpider, FALSE);