ger4 Posted March 27, 2013 Posted March 27, 2013 If anyone can help, I basically need to find a way to call update3d on all the npcs in the cell the player is in as well as the player themselves at the same time in a script. Thanks
perfectioncat Posted March 27, 2013 Posted March 27, 2013 I think that you find a necessary thing if you check Ref Walking Functions.
Guest ThatOne Posted March 27, 2013 Posted March 27, 2013 You could use an array if it has to be exactly "at the same time"... Check each ref around the player (getnextref I guess?), check if they are in an active (loaded) cell at the time the script checks, add all those refs to an array and, once done, call update3d on all refs in the array. Note that if any actors change their cells to ones that aren't loaded you may need to make a secondary check (at the time you call update3d). If it doesn't have to be exactly at the same time, you could call update3d on each actor individually (instead of the array). This would also eliminate the issue of actors changing cells. To find which cell the player is in, you can try GetInCell or GetCurrentRegions. Not sure about the second one as I've never used it (but it seems like it could be related). Sorry if that wasn't too helpful, I haven't scripted anything in a long time (currently playing DotA 2).
ger4 Posted March 27, 2013 Author Posted March 27, 2013 Don't worry, WappyOne already gave me a useful script anyway to work with since I am a complete scripting noob and can't do arrays. I've had another think an i think the best option would be to create a script that loops back on itself until it detects there are no more couples having sex in the current cell. If someone could write this one for me/give me a rough outline I would be very grateful Specifically, I need a script that updates the 3d of all actors in a cell after a sex scene has finished, but if their are multiple sex scenes, it must wait from them to finish too before calling update3d.
TDA Posted March 27, 2013 Posted March 27, 2013 as spell scn aaActHelperint ssshort anumshort nshort trref acrbegin scripteffectstartlet anum:=getnumrefs 69if anum!=0let acr:=getfirstref 69let n:=0while (n<anum)if acr.getdistance player<9333&&acr.getdisabled==0acr.update3dendiflet n:=n+1let acr:=getnextrefloopendifendifend
ger4 Posted March 28, 2013 Author Posted March 28, 2013 as spell scn aaActHelper int ss short anum short n short tr ref acr begin scripteffectstart let anum:=getnumrefs 69 if anum!=0 let acr:=getfirstref 69 let n:=0 while (n<anum) if acr.getdistance player<9333&&acr.getdisabled==0 acr.update3d endif let n:=n+1 let acr:=getnextref loop endif endif end Thanks TDA Although i haven't been able to use your code, I just wanted to say I have released another version of loversetscale and that i really appreciate your help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.