Jump to content

Operation Wolf


Thirsty Panther
 Share

Recommended Posts

I'm making a version of Taitos arcade game Operation Wolf for the Halloween tournament. I thought if I post about it that it would help me keep on track and would not become another half finished project.

 

https://en.wikipedia.org/wiki/Operation_Wolf

 

The idea of the game is to rescue the hostages.

 

Very early stages. Have crosshairs working ( thanks Macklelbee ), health, ammo, score and hostage counters displayed but not yet working.

 

Next step to get firing to work and for the right mouse button to collect health kits, ammo boxes and to rescue hostages.

  • Upvote 4
Link to comment
Share on other sites

  • 2 weeks later...

Modified my Medkit spawning script. Originally it would simply spawn the medkit at the location of the pivot. The game is played with a static screen so I thought it would be more interesting for the player if the Medkits where a bit more dynamic. I remember watching BluHornets

 

 

video where the enemies would spawn items once killed. He added a force to the spawned item so they ejected from the dead enemy. I used this idea so the medkit would spawn off screen and be "thrown" to land in front of the player. There is a timer on the Medkit so that it disappears after a short time. This will force the player to stop shooting the enemy if he wants to pickup a medkit.

 

I will use the same idea to spawn ammo as well. I just need to find a suitable (free) model. Any suggestions?

One of the "free"ones I found said it was from Battlefield 3. I didn't use it as lawyers are not good for your health or bank balance.

http://steamcommunity.com/sharedfiles/filedetails/?id=537863986

 

Next step is to setup the Player script so that right clicking on a medkit will increase the players health. This will require me getting my head around pickinfo. Once I've sorted that out applying the same principle to ammo and to rescuing hostages should be straight forward (I hope). Then I need to get firing working.

  • Upvote 1
Link to comment
Share on other sites

OK. mixed week this week. Started badly with AMD driver dramas. Leadwerks was giving me a "failed to initialize graphics" error so simple solution is to rollback the driver right?. No, something has changed with either Windows 10 or AMD software so that older drivers cannot be applied to newer driver. Much Googling and eventually the solution was found. Unistall all AMD software and start again. Anyway got Driver 14.9 and I'm back in action. Note to self get a Nvida card next time.

 

Found a model for the Ammo Box. Not exactly what I want but it will do as a filler.

weapon_box_pack_3_by_nobiax-d4oqu44.jpg

 

Its by Nobiax.

 

http://nobiax.deviantart.com/

 

He has a great collection of free models and his textures are also on the Workshop.

 

My player script is set up so that when the player "Right Clicks" on a medkit or Ammo Box he is credited with health or ammo. Here is part of my player script. If anyone wants the whole script just message me.

 

function Script:UpdateWorld()

 

--collect Ammo or Healthkit

if window:MouseDown(2) then

 

local window = Window:GetCurrent()

local pickinfo= PickInfo()

local mpos= window:GetMousePosition()

 

 

if (self.camera:Pick(mpos.x,mpos.y,pickinfo,0,true,2)) then

pentity= pickinfo.entity

name= pentity:GetKeyValue("name")

System:Print( "picked!!!!!")

System:Print( mpos.x)

System:Print( mpos.y)

System:Print( name)

 

if name == "healtkit" then

 

self:ReceiveHealth(20)

 

end

 

if name == "Target" then

 

self:TakeDamage(20)

 

end

 

if name == "AmmoBox" then

 

self:ReceiveAmmo(20)

 

end

 

 

if pentity ~= nil then

 

pentity:Release()

 

end

 

end

 

end

end

 

Initially we check for the right mouse button to be pressed "if window:MouseDown(2) then"

Next we set some variables

Then the pick is made. I used a camera pick in my script.

The next bit was a result of trial and error ( a lot of errors). On one of the forum post someone was using a pick to change the colour of a block. They used pickinfo.entity and set color to achieve this. That got me thinking that maybe I could check the name of the entity that has been picked and if its a medkit add health. And if its an Ammo box add ammo. So I created a variable "pentity" which is the pickinfo.entity and then created a variable that retrieves the name of the entity "name".

The next lines of System:Prints are not needed in the final script but are invaluable to find errors. I had the script working except the Medkit was not adding health when it was being picked. A check of System:Print ("name") gave me the answer. I had a typo in the Medkits name (healtkit instead of healthkit) Arrrgh.

Once we know the name of the picked item then it is just a matter passing the value of health or ammo to the players health and ammo scripts.

The target in the script was just a cylinder I was using to deal damage to the player.

The final part of the script checks that something was picked "if pentity ~= nil then" and if it was then to remove (release) it from the game.

 

Next I need to set up the mechanics of the Hostages and firing of the players weapon. Hostages will be Maximo fuse models.

Thanks for reading.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...