Enemy with weapons?

Topics regarding Scripting with Reality Factory
Post Reply
Dysphoriac
Posts: 23
Joined: Sat Aug 06, 2005 8:50 pm
Location: United States of America

Enemy with weapons?

Post 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.
"We revel in rebellious ways, rebellion that the media made. If you change your channel we'll smash your T.V."
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post 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
Dysphoriac
Posts: 23
Joined: Sat Aug 06, 2005 8:50 pm
Location: United States of America

Post by Dysphoriac »

I kind of understand what you mean, but i can't get it to work correctly.
"We revel in rebellious ways, rebellion that the media made. If you change your channel we'll smash your T.V."
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman »

Where are you getting stuck?
Dysphoriac
Posts: 23
Joined: Sat Aug 06, 2005 8:50 pm
Location: United States of America

Post 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?)
"We revel in rebellious ways, rebellion that the media made. If you change your channel we'll smash your T.V."
Lupus
Posts: 10
Joined: Tue Sep 27, 2005 9:17 am

Post by Lupus »

Have you configured a pawn weapon entry in the pawn.ini file?
Life is the software of reality...
If you think it isn't fair, ask God to hack the code!
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post 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
Dysphoriac
Posts: 23
Joined: Sat Aug 06, 2005 8:50 pm
Location: United States of America

Post 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?
"We revel in rebellious ways, rebellion that the media made. If you change your channel we'll smash your T.V."
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post 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.
LHoesch

Post by LHoesch »

I have the same problem.
I had copy all the files together,but it crashed.
Can anyone help me?
User avatar
SithMaster
Posts: 306
Joined: Mon Jul 04, 2005 11:45 pm

Post 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.
The brightest light casts the darkest shadow.
Burn the heretic. Kill the mutant. Purge the unclean.
Post Reply