peekay Posted June 9, 2010 Author Share Posted June 9, 2010 Now im trying to call over subs into a scripted NPC sequence in attackNPC in EO.When I try to call getplayerdir(index) it says that its not a defined variabledo I just dim index as long in the attackNPC sub?thanks- PK Link to comment Share on other sites More sharing options...
balliztik1 Posted June 9, 2010 Share Posted June 9, 2010 No. "Index" is just a variable name used for the player's number. A quick glance will show you that the AttackNPC sub uses "Attacker". Link to comment Share on other sites More sharing options...
peekay Posted June 9, 2010 Author Share Posted June 9, 2010 What about say that ive created a scripted npc behaviour.And in the script for that npc I callcannpcmovecan I make the dir set to the players diror should i use the updatenpcAI for this Link to comment Share on other sites More sharing options...
shadowwulf Posted June 9, 2010 Share Posted June 9, 2010 you may need to set it… like Index=GetNPCTarget(NPCNUM, NPCMapNum) or whatever the command is. Link to comment Share on other sites More sharing options...
balliztik1 Posted June 9, 2010 Share Posted June 9, 2010 @peekay:> What about say that ive created a scripted npc behaviour.> And in the script for that npc I call> cannpcmove> can I make the dir set to the players dir> or should I use the updatenpcAI for thisDepends on how you want to organize your source I guess. Just try a couple ways to see how it best fits whatever you're making. As for setting the NPC's direction to the same as the player's direction, that's really simple stuff. I'd wager you're trying to make some kind of NPC pet system or improve on the AI. It'll take a lot if you don't know how simple things like that are done.```Npc(map, slot).dir = player(index).dir```Just fill in map, slot, and index with the appropriate variables as whatever sub you decide to slap that in uses. Link to comment Share on other sites More sharing options...
peekay Posted June 10, 2010 Author Share Posted June 10, 2010 cheers guys thanks for ur help, i havent done vb in like 5 years maybe more, still getting use to how its laid out Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now