Page 1 of 1

Enemy with weapons?

Posted: Mon Oct 03, 2005 1:06 am
by Dysphoriac
Can anyone tell me how to make a scripted enemy hold and use a weapon. If anyone can, then an actor and script would be a nice example.

Posted: Mon Oct 03, 2005 1:37 am
by rgdyman
Theres a command for the the weapon ( I belive it's HighLevel)
If you want the pawn to have the weapon at Spawn, just add this in in the Spawn() Order.

SetWeapon("Bat");

In the Pawn.ini you need to define it as weapon

[Bat]
actorname = Bat.act
actorrotation = -90 180 0 0
actorscale = 0.2
fillcolor = 0 0 0
ambientcolor = 0 0 0
type=weapon

Dont forget to have the same skeleton assigned to the .act weapon.
boundingboxanimation= defaultpose
subjecttogravity = true

Posted: Mon Oct 03, 2005 2:30 am
by Dysphoriac
I kind of understand what you mean, but i can't get it to work correctly.

Posted: Mon Oct 03, 2005 2:43 am
by rgdyman
Where are you getting stuck?

Posted: Mon Oct 03, 2005 2:46 am
by Dysphoriac
Well, I'm not sure, I don't know what the "highlevel" thing is and I'm not sure where to put the SetWeapon("Bat"); (in the entity?)

Posted: Mon Oct 03, 2005 2:52 am
by Lupus
Have you configured a pawn weapon entry in the pawn.ini file?

Posted: Mon Oct 03, 2005 3:17 am
by hike1
http://terrymorgan.net/download.htm


demo064.zip (2 MB)-Demoed: Flame entity damages player, buying and selling conversations, Static Entity Proxies, Generic Messages (pieces of paper that you can read), Looting gold from a Dead Pawn baddie.


Demo064b.zip (883K)- Demoed: Change Material on actors, Pawn Monsters, A 'lost my cat, find it please' script. Toxic Gas Area, Lights that light up when you walk by them, Electric Bolts notes. Uses the Demo.txl of Demo053.


mislmelee.zip (549K) -Demo of Shelley changing from missile to melee attack at close range. Change her 'projectile' entry in the Pawn entity from 'bullet' to 'pistolbullet' to match the standard Reality Factory. Also has a bat weapon, check the included weapon.ini for the bat entry and put it in the standard RF weapon.ini. Sounds go in /audio, script goes in /scripts, actors go in /actors

Posted: Mon Oct 03, 2005 3:52 am
by Dysphoriac
yes, all I had to do is copy paste what you wrote into the weapon.ini and then change it to the correct weapon and model, right?

Posted: Tue Oct 04, 2005 1:26 am
by hike1
I never could get the setweapon() thing to work, I always
stick a weapon on each baddie, see maxgena2.zip on
http://terrymorgan.net/download.htm for how to do it in Max.

Posted: Thu Nov 03, 2005 3:11 pm
by LHoesch
I have the same problem.
I had copy all the files together,but it crashed.
Can anyone help me?

Posted: Sat Nov 05, 2005 2:38 am
by SithMaster
Dont think your supposed to combine all the files. Go to the ai ini file and add the setweapon line. Then go to the weapon definitions which is separate file and add the definition.

Dont worry about high level right now.